Forum Discussion
qwertzuiop
Advocate III
3 years agoConditional count
Hello dear Power-BI-Community Following problem to solve: Let's assuem this table: Person Check A 1 A 0 A 0 B 0 B 0 C 1 C 1 D 0 D 0 D 0 Peo...
- 3 years ago
As Syk , suggested, this is easiest done in two steps. I would do it this way.
Create a new Calculated Column:
TotalChecks = CALCULATE( SUM(Checks[Check] ), ALLEXCEPT( Checks, Checks[Person] ))PersonCheckTotalChecks
A 1 1 A 0 1 A 0 1 B 0 0 B 0 0 C 1 2 C 1 2 D 0 0 D 0 0 D 0 0 Then create a new Measure:
0_Checks = CALCULATE( DISTINCTCOUNT( Checks[Person] ), FILTER( Checks, Checks[TotalChecks] = 0 ))Trust this works for you.
Regards,
Syk
Resident Rockstar
3 years agoYou can create a measure to sum your checks and then another to check for sum < 1. (You could also skip the first measure if your column is already summed)
It would be something like...
people_not_checked = CALCULATE(DISTINCTCOUNT('Table'[Person]),'Table'[Check]<1)