Forum Discussion
DAX Calculate SUM of Conditional multiple columns
- 4 years ago
I was thinking in terms of a calculated column.
Since you're doing this as a measure, I think it can be simpler:
CALCULATE ( SUM ( Table1[Count] ), Table1[Success] = "TRUE" )
Ok, I tried! but somehow the calculation is messing with me. I need to get the percentage and realized I have one category for each day so skipped the Timestamp.
I certainly wouldn't expect it to work if you remove [TimeStamp] from the measure.
- Anonymous4 years agoNot applicable
okay, I added Timestamp, and it' same. I see that it's counting all FALSE values regardless of the TestName category.
I need to count for each TestName and Success,
- AlexisOlson4 years ago
Super User
Can you share some example data in a format that can be copied and pasted from? Please include the result you expect to match as well.
- Anonymous4 years agoNot applicable
Here is the table and I am looking for a table matrix for each individual day.
% percentage =
DIVIDE([Passcount], ([Passcount] + [FailureCount]))Test Name % pecentage iqa 97.7% coverageweb-healthcheck 100% XMods And More 99.53% TimeStamp TestName message Success Count Friday, April 29, 2022 coverageweb-healthcheck Passed TRUE 85 Friday, April 29, 2022 XMods And More Passed TRUE 212 Friday, April 29, 2022 XMods And More HTTP status: 500; response code: 2; response message: There has been a system error. FALSE 1 Friday, April 29, 2022 iqa Passed TRUE 85 Friday, April 29, 2022 iqa HTTP Error FALSE 2 Thursday, April 28, 2022 XMods And More HTTP status: 500; response code: 2; response message: There has been a system error. FALSE 1 Thursday, April 28, 2022 coverageweb-healthcheck Passed TRUE 288 Thursday, April 28, 2022 iqa Passed TRUE 288 Thursday, April 28, 2022 XMods And More Passed TRUE 719