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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Vsaez
Frequent Visitor

Problem with percentage of categorical data

Hello everyone

I am learning Power BI, so this question may seem easy to you.
I have a report where all the visuals, tables, etc, come from a dataset that only has categorical data, accompanied by an ID.
For example, if I want to calculate the frequency of a category, I count this ID, and so on with any type of visual that I want to add.

So, what they ask me now, in a graph that is filtered by Top N, is that the percentage that the graph shows is the percentage of the total, not the value filtered in the top N.

 

Example:
The first category has 35,097 cases, so its percentage with respect to the total data (117,672) is 29.8%. The graph now shows me that value as 36.8%.

Vsaez_0-1617721353360.png

 

How can I go about calculating this? I know that when they are numerical values it is easier, but since the value in this case is an ID, I don't know how to do it ...

Thanks a lot

1 ACCEPTED SOLUTION

Thanks @Jihwan_Kim 
https://drive.google.com/file/d/13-xZijRGkqCOvVPb0c10Z0QxHA6N4lch/view?usp=sharing

 

I hope that link works
as I am new, I don't know if there is another way to add it here.

thank you very much again

View solution in original post

3 REPLIES 3
v-xulin-mstf
Community Support
Community Support

Hi @Vsaez,

 

Is your issue solved?

I see your expect output in the attached pbix file.

v-xulin-mstf_1-1617954178256.png

 

Best Regards,

Link

Jihwan_Kim
Super User
Super User

Hi, @Vsaez 

I think you are doing it in the correct way. However, if it is OK with you, please share your sample pbix file's link here, then I can try to look into your measure and try to solve the issue.

 

thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Thanks @Jihwan_Kim 
https://drive.google.com/file/d/13-xZijRGkqCOvVPb0c10Z0QxHA6N4lch/view?usp=sharing

 

I hope that link works
as I am new, I don't know if there is another way to add it here.

thank you very much again

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.