Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi!
I have this data sample:
ID CAT SUBCAT
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 1 6
7 1 7
8 1 8
9 2 9
10 3 10
I am trying to make a bar chart where I want to show on additional data the percentage of each category (CAT).
How could I create a measure that shows that percentage?
Thank you! Regards!
Solved! Go to Solution.
Total = COUNT('Table'[CAT])
Percentage = DIVIDE([Total],CALCULATE(COUNT('Table'[CAT]),ALLSELECTED('Table'[CAT])))
Hi! Thanks for your answer!
What I am looking for is the percentage of a category over the total rows. For example:
CAT 1 - 4/10 - 40%
CAT 2 - 2/10 - 20%
CAT 3 - 2/10 - 20%
CAT 4 - 1/10 - 10%
CAT 5 - 1/10 - 10%
You can ignore the subcat column actually, it came from another problem I was trying to solve.
Regards!
Total = COUNT('Table'[CAT])
Percentage = DIVIDE([Total],CALCULATE(COUNT('Table'[CAT]),ALLSELECTED('Table'[CAT])))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
53 | |
39 | |
36 |
User | Count |
---|---|
100 | |
85 | |
47 | |
46 | |
44 |