Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table like this.
Person | M1 | M2 | M3 | M4 |
Peter | 1 | 0 | 0 | 0 |
Jane | 0 | 0 | 0 | 0 |
Tom | 1 | 0 | 1 | 0 |
Mary | 1 | 1 | 1 | 0 |
I want to count rows when at least one of the M1, M2, M3, and M4 has value.
Solved! Go to Solution.
You can create a measure as follows:
PeopleCount = CALCULATE(
DISTINCTCOUNT(TableName[Person]),
FILTER(ALL(TableName), TableName[M1] + TableName[M2] + TableName[M3] + TableName[M4] >= 1)
)
BTW, I recently developed this Power BI Smartable android app
I appreciate it if you can try it and share any feedback.
@Anonymous , Try a measure
row count =countrows(filter(Table, Table[M1] +Table[M2]+Table[M3]+Table[M4] >0))
You can create a measure as follows:
PeopleCount = CALCULATE(
DISTINCTCOUNT(TableName[Person]),
FILTER(ALL(TableName), TableName[M1] + TableName[M2] + TableName[M3] + TableName[M4] >= 1)
)
BTW, I recently developed this Power BI Smartable android app
I appreciate it if you can try it and share any feedback.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
36 | |
33 | |
18 | |
18 |