Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The 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.

Reply
Fátima
Helper II
Helper II

Percentage of each value of a column

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).

Captura de pantalla 2023-02-07 102919.jpg

How could I create a measure that shows that percentage?

 

Thank you! Regards!

1 ACCEPTED SOLUTION

 

 

 

Total = COUNT('Table'[CAT])
Percentage = DIVIDE([Total],CALCULATE(COUNT('Table'[CAT]),ALLSELECTED('Table'[CAT])))
 

 

https://dropmefiles.com/DjJVY

 

Screen Capture #267.png
 
 
 

 

View solution in original post

3 REPLIES 3
Ahmedx
Super User
Super User

Is this what you are looking for?
https://dropmefiles.com/dJIDq

Screen Capture #266.png

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])))
 

 

https://dropmefiles.com/DjJVY

 

Screen Capture #267.png
 
 
 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.