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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jospradil
Regular Visitor

How to get Top N, without affecting the actual Percentages?

Hello,

 

I am trying to create a pie chart that displays only the top major causes, where each major cause has a fixed category proportion, So I would like to show the top major causes without affecting the category proportion percentage, when I tried doing the GT% of the total, the percentages changed, it changed according to the top N only, Like it is considering only the top major causes to be 100%.

 

Can anyone please help me with this problem?CategoryPropDiagram.PNGTopN.png

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @jospradil ;

You should create a measure to calculate the percentage.

Measure = SUM([ Sales])/CALCULATE(SUM(financials[ Sales]),ALL(financials))

then set it.

vyalanwumsft_1-1656049882257.png

 


The final show:

vyalanwumsft_0-1656049749501.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @jospradil ;

You should create a measure to calculate the percentage.

Measure = SUM([ Sales])/CALCULATE(SUM(financials[ Sales]),ALL(financials))

then set it.

vyalanwumsft_1-1656049882257.png

 


The final show:

vyalanwumsft_0-1656049749501.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-yalanwu-msft 

 

Thanks for your reply! I am trying to create a pie chart according to the count of crash_key; the numbers and percentages are shown in such a way that it counts the crash_key (The crash_key looks like 2017334512). My dashboard is where we select an intersection ID; each intersection ID has a category description like

undivided high-speed partial stop, etc. Now in this category description, I am trying to calculate the category proportions for each factor of the crash (Like Major Cause, Environmental Conditions, etc.); I tried using your method by putting count instead of sum; this is what my measure looks like:

 
Measure 2 = COUNT([CRASH_KEY])/CALCULATE(COUNT('All Data_Crash Level'[CRASH_KEY]),ALL('All Data_Crash Level'[CRASH_KEY]))
 
It is not giving me the right numbers; please help me with this, I am new to PowerBI, and I would appreciate it if this is solved! Thank you once again!
 
 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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