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
Anonymous
Not applicable

Automatically Merge Legend Categories in Pie Chart in Conditional Percentage

Hi,

 

I have pie chart that consists dozens of categories in the legend. Is there any way to automatically merge categories whose percentage is less than a certain value (for example less than 2 %) into one category (let's say named "Others"). As this is a live data, I cannot simply merge the category manually because the percentage could always be changed.

 

toontr_0-1608132295860.png

 

Thank you for your help.

Vano.

 

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

Hi, @Anonymous 

What is your current data source?

If your data model is liveconnect,I'm afraid that it is impossible to do that in a pie chart  .  Amitchandak 's method  isn't  feasible for pie chart visual. As of now, the legend of the pie chart does not support the measure type field. 

 

If you don’t mind converting the data model into import mode, you can create a calculated column as below:

 

Defect Type2 =
VAR percentage =
    'Table'[Value] / SUMX ( ALL ( 'Table' ), 'Table'[Value] )
RETURN
    IF ( percentage <= 0.02, "others", 'Table'[Defect type] )

 

103.png

 

Best Regards,
Community Support Team _ Eason

 

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

What is your current data source?

If your data model is liveconnect,I'm afraid that it is impossible to do that in a pie chart  .  Amitchandak 's method  isn't  feasible for pie chart visual. As of now, the legend of the pie chart does not support the measure type field. 

 

If you don’t mind converting the data model into import mode, you can create a calculated column as below:

 

Defect Type2 =
VAR percentage =
    'Table'[Value] / SUMX ( ALL ( 'Table' ), 'Table'[Value] )
RETURN
    IF ( percentage <= 0.02, "others", 'Table'[Defect type] )

 

103.png

 

Best Regards,
Community Support Team _ Eason

 

amitchandak
Super User
Super User

@Anonymous , One of the quick things I can think of is TOPN with Other

https://www.youtube.com/watch?v=UAnylK9bm1I

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.