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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.


Go to 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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