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.
I currently have the following similar measures, all doing the same calculation, except the numerator is filtered for the different values in the "Animal Type" column.
% of Cats = CALCULATE(COUNT([Animal]), [AnimalType] = "Cat") / COUNT([Animal])
% of Dogs = CALCULATE(COUNT([Animal]), [AnimalType] = "Dog") / COUNT([Animal])
% of Horses = CALCULATE(COUNT([Animal]), [AnimalType] = "Horse") / COUNT([Animal])
% of Cows = CALCULATE(COUNT([Animal]), [AnimalType] = "Cow") / COUNT([Animal])
Instead of 4 different measures, is there a way to have a single measure to do a calculation? On a visual, I would still want to visualize all 4 line measures. But is there a more efficient way of creating filtered measures?
The column AnimalType has the values: Cat, Dog, Horse, Cow.
Solved! Go to Solution.
@ninos-shiba Try:
% of Animal = DIVIDE(COUNT([Animal]), COUNTROWS(ALL('Table')))
Use your Animal column in your Legend.
@ninos-shiba Try:
% of Animal = DIVIDE(COUNT([Animal]), COUNTROWS(ALL('Table')))
Use your Animal column in your Legend.
User | Count |
---|---|
88 | |
88 | |
74 | |
67 | |
58 |
User | Count |
---|---|
136 | |
110 | |
91 | |
84 | |
69 |