Forum Discussion
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.
Thank you for your help.
Vano.
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] )Best Regards,
Community Support Team _ Eason
2 Replies
- amitchandak
Super User
Anonymous , One of the quick things I can think of is TOPN with Other
- v-easonf-msft
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] )Best Regards,
Community Support Team _ Eason