Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Make Pie Chart show 0 when no data available

Hi all,

 

I have a table visual with customer data & I have a Pie Chart that breaks out different data. These two visuals are different data sets and there are situations where the customer table will have data but when I click on the customer the Pie Chart goes blank becuase there is no data abailable for the data set feeding the Pie Chart. 

 

when you click on a customer where the Pie Chart would go blank I would like the pie chart to show 0 with a legend value of "No Data Avalibale" rather then the visual going blank. 

 

Is this possible? Thank you all for the feedback!

3 Replies

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

    Anonymous You could use a measure in the pie chart and add an IF statement to the measure:

     

    New Measure = IF( ISBLANK([Current Pie Value]), 0, [Current Pie Value])

     

    To get the 'no data available' heading you'll need to add that to your data model/tables or create a table that displays this - could potentially use ADDCOLUMNS or SUMMARIZE and the measure values??? 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    You can try the method in the following links to convert the blank value to 0:

    1. POWER BI PRO TIP: SHOW 0 INSTEAD OF (BLANK)  

    TotalSales = COALESCE(SUM('Table'[Sales]),0)

    2. show items with no data as 0 instead of blanks

    TotalSales= IF ( ISBLANK ( SUM ( 'Table'[Sales] ) ), 0, SUM ( 'Table'[Sales] ) )
    TotalSales= SUM ( 'Table'[Sales] ) + 0

    Showing an alternate text when no data available in a Power BI chart visuals

    Best Regards

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

      Anonymous  have you been able to try any of these solutions? Please provide feedback on how it went. 

       

      v-lionel-msft  Please tell me what is missing / wrong from my post, which was posted 1 week before Anonymous but still not marked as a solution. In fact, I have added further guidance on how to update the legend, with Anonymous  has ignored. 

       

      Anonymous  Please also be advised that all these solutions may impact how your filters and tables behave, as you no longer have any blank values. 

      Keen to hear how you're getting on with this one. 

       

      Thanks!