Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have a table with two columns, one with a name and another with a value (1 or 0).
I want to count the number of occurences of the value 1 to each name (that could be duplicate).
For example, I have this table
| Name | Value |
| A1 | 0 |
| A1 | 1 |
| A1 | 1 |
| A2 | 0 |
| A2 | 0 |
| A3 | 1 |
| A3 | 1 |
| A4 | 0 |
| A4 | 1 |
And I want to get something like this
| Name | Value | Occurences |
| A1 | 0 | 2 |
| A1 | 1 | 2 |
| A1 | 1 | 2 |
| A2 | 0 | 0 |
| A2 | 0 | 0 |
| A3 | 1 | 1 |
| A3 | 1 | 1 |
| A4 | 0 | 1 |
| A4 | 1 | 1 |
My goal is to use the result/calculated column as a slicer, with the number of occurences of 1's as options, to filter list of names.
I already created this DAX measure to do it but i can't use it as a slicer
rank = CALCULATE(COUNT(Table[Value]);FILTER(Table;Table[Value] = 1)).
Any suggest how can I work around this problem?
Thank you in advice!
Solved! Go to Solution.
try a measure
Occurences = CALCULATE(COUNTROWS(Table); ALLEXCEPT(Table; Table[Name]); Table[Value]=1)
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 |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 8 | |
| 7 |