Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I want to calculate the distinct count on a set of values in this way:
measure = CALCULATE(DISTINCTCOUNT(field_count),FILTER(ALL(fielf_fil_1,field_fil_2), flag=1))
the problem is that in the page I have a slicer based on another field which is aggregating the values when I show them in a card and I don't know how to make the slicer effecting the measure without making it group by; if I add this field to ALL function the measure won't be affected by the slicer field, but in this way the measure returns the total count grouped by the slicer field.
Any suggestion?
Thanks,
Andrea
Solved! Go to Solution.
Hi,
I solved this issue creating a new table with the domain of the values.
Hope it could be helpful for others.
Thanks,
Andrea
Hi,
I solved this issue creating a new table with the domain of the values.
Hope it could be helpful for others.
Thanks,
Andrea
Hello @arimoldi
could you please share a visual representation of what you want to achieve ?
best regards
Hi,
this is a sample dataset:
| name | skill | target |
| a | x | 2 |
| a | y | 3 |
| a | z | 0 |
| b | x | 2 |
| b | y | 4 |
| b | z | 1 |
| c | x | 3 |
| c | y | 1 |
| c | z | 3 |
| d | x | 2 |
| d | y | 2 |
| d | z | 0 |
| e | x | 3 |
| e | y | 1 |
| e | z | 4 |
This the applied filter from the visual slicer: target = 2 and target = 3
This is what I would like to get:
| skill | target | count user |
| x | 2 | 4 |
| x | 3 | 4 |
This is what I get:
| skill | target | count user |
| x | 2 | 3 |
| x | 3 | 1 |
So the count user measure should count the overall amount of users for the selected target fields, but if I add the target field to the ALL function it does not consider the filter slicer values, instead if I don't add it to the ALL function the last above table i what I get.
Any suggestion?
Thanks,
Andrea
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!