Forum Discussion
v-manonc
7 years agoFrequent Visitor
Divide one count column by total count
Hi All, Im new to BI and had a quesiton how to callucleate the total count / total count example as given Froot count(froot) measure = divide[count]/sum[count] - Not working... a...
ZunzunUOC
7 years agoResolver III
v-manonc
7 years agoFrequent Visitor
I need the same,
in backend take the count value from (count of froot)
im trying in this way -
Percent = [countoftransport] / sum([countoftransport])
- ZunzunUOC7 years agoResolver III
Could you share your raw data?
- v-manonc7 years agoFrequent Visitor
Raw Data:
Headder Apple Apple Apple Apple Apple Apple Banana Banana Banana Banana Banana Banana Grapes Grapes Grapes Grapes Mango Mango Mango Mango Mango abcde In the need a contribution of individual.
Required output as: in BI
Row Labels Count of Headder % Apple 6 27% Banana 6 27% Grapes 4 18% Mango 5 23% abcde 1 5% Grand Total 22 - ZunzunUOC7 years agoResolver III
Ok, I already understand you.
You need to create two calculated columns:
Count = var VFruit=Fruits2[Fruit] return CALCULATE(COUNTROWS(Fruits2);FILTER(Fruits2;Fruits2[Fruit]=VFruit))
Result = Fruits2[Count]/SUM(Fruits2[Count])
I have used your raw data and this is the result:
Best Regards,
Miguel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.