Forum Discussion

AlexeyRusinov's avatar
AlexeyRusinov
Icon for Helper II rankHelper II
10 years ago

Show aggregated values in piechart legend

Hello everyone,

 

I have been given a task and I am not sure it is possible to achieve in Power BI.

I have a piechart, showing count of entities as values and grouped by categories. In the legend of the piechart I want to see not only the name of the categories but also the aggregated sum amount (another field), that belongs to this category, and is affected by filters. 

I see that it is possible to choose multiple fields as "legend", but I'm afraid it only works as a drilldown setting. Also, it is not possible to aggregate there.  

 

Does anyone knows if it's possible to do? Any help would be much appreciated. 

8 Replies

  • ankitpatira's avatar
    ankitpatira
    Icon for Community Champion rankCommunity Champion

    AlexeyRusinov Get latest version of power bi desktop -> then drop the field for which you want Sum of under Tooltip section for pie chart.

     

    • AlexeyRusinov's avatar
      AlexeyRusinov
      Icon for Helper II rankHelper II

      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).

       

      • ankitpatira's avatar
        ankitpatira
        Icon for Community Champion rankCommunity 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. 

  • melanid's avatar
    melanid
    Frequent Visitor

    Hi, 

     

    I have the same request from a customer. Did you find a way to do this? I tried calculated column but it does not work, the calculation doesn't work. 

     

    Thanks.