Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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.