Forum Discussion
Show aggregated values in piechart legend
AlexeyRusinov Get latest version of power bi desktop -> then drop the field for which you want Sum of under Tooltip section for pie chart.
ankitpatira , thank you for your answer. That will allow me to add summarized values as a tooltip (appearing info when mouse is over a chart), but what I am trying to do is to add these values in a legend, with color descriptions (showed on a picture below).
- ankitpatira10 years ago
Community Champion
AlexeyRusinov The only way i think you can do that is create a new calculated column using DAX that will give you sum or count of your value field by category field and then concate that with your category field so creating calculated column as 'Grey Stripe - 100'. Then use that calculated column for your category field in pie chart. Legend shown for pie chart is basically your category field you've used.
- AlexeyRusinov10 years ago
Helper II
ankitpatira I thought about this, it seems that this option will not work if I want to change filtering (date period, for example).
- v-ljerr-msft10 years ago
Microsoft Employee
In a chart, the legend is only to display the series/ categories, it’s not possible to show aggregated values dynamically in pie chart legend. For your requirement, you can turn off the legend for your pie chart, and use a table visual beside the pie chart, and display the categories and the corresponding aggregated values dynamically on that table which sliced by other field.
Regards