Forum Discussion

balajiratnala6's avatar
3 years ago
Solved

How to generate custom legends for Donuts?

I have generated below donut visual. But it showing for No data fields also. I want to show legends only for available Donut slicec. Please help me to do it.
  • v-jingzhang's avatar
    v-jingzhang
    3 years ago

    Hi balajiratnala6 

     

    Here is a workaround you can try:

    First in Power Query Editor, select all four columns and click on Unpivot Columns. Change column data types. Apply the change to Power BI Desktop. 

     

    Then create a Donut chart. Put Attribute column in legend and Value (Sum aggregation) in values. Then filter Sum of Value to show items when the value is greater than 0. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!