Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI Guys,
Want to get the count of rows at specific hierarchy/group level with a condition. Sample data:
| Row | Value |
| Group1 | Good |
| subGroup1 | |
| Row1 | |
| Row2 | |
| Group2 | Bad |
| SubGroup1 | |
| Row3 | |
| Row4 | |
| Group3 | Good |
| subGroup1 | |
| Row5 |
Need the calculation to get the count of value = 'Good' at the Group level, which 2 in above case. What visual to use to show this single result in a single box?
Thank you
Solved! Go to Solution.
Hi @New
I suppose "Value" is a measure in matrix visual. Then
Good (Count) =
SUMX ( VALUES ( Table[Group] ), IF ( [Value] = "Good", 1 ) )
Hi @New ,
Please refer to my pbix file to see if it helps you.
Create a column first.
Column = IF('Table'[Value]="Good",1,BLANK())
Then put the column into a card visual.
If I have misunderstood your meaning, please provide your pbix file without privacy information and your desired output with a screenshoot.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @New
I suppose "Value" is a measure in matrix visual. Then
Good (Count) =
SUMX ( VALUES ( Table[Group] ), IF ( [Value] = "Good", 1 ) )
Thank you tamerj1, your solution worked.
@New , Try a measure like
if(isinscope(Table[Group]), countx(filter(Table, [Value] ="Good"), Table[Group]), blank())
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 8 | |
| 8 |