Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
104 | |
93 | |
83 | |
64 |