Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Earl40
Helper I
Helper I

How can I get a blank pie chart to show 0 is no values for the month

I have a pie chart filtered to show only XYZ items for the past 1 calendar months. The chart doesnt show any values since theres no XYZ items for December 2024. I want the chart to automatically show 0 if theres no data. Sample data set and screenshot below. Thank you in advace

 

powerbi screenshot

 

Earl40_0-1736385518301.png

 

 

data set:

 

CategoryDate
ABC12/8/2024
ABC12/9/2024
ABC12/10/2024
ABC12/11/2024
ABC12/12/2024
XYZ11/13/2024
XYZ11/14/2024
DEF12/12/2024
DEF12/13/2024
DEF12/14/2024
2 ACCEPTED SOLUTIONS
Irwan
Super User
Super User

hello @Earl40 

 

i am not sure if you can do this in pie chart.

if there is a pie, it means there is a value. But you can show zero in card visual that means you need to insert another visual.

Irwan_0-1736390109283.png

 

however, i think i have seen a trick to manage this but if you have many pies (make a separation or something) but i doubt it will work if you want to show one pie with blank value.

 

Hope this will help.

Thank you.

View solution in original post

v-jingzhan-msft
Community Support
Community Support

Hi @Earl40 

 

I agree with @Irwan. The Pie chart is to show how individual parts contribute to the whole. When the whole is 0, it cannot display 0 singly. 

 

The trick is to use a Card visual to display the count value 0. Then use conditional formatting feature to set up the background and text color of the Card visual. Place this Card visual over the Pie chart to indicate that there is no data. 

  • When the Count is not blank, set up the background and text to transparent color.
  • When the Count is zero, set up the background to white (the same background color of the pie chart) and set text to black (or other color as you like).  

 

Steps are:

1. Create a [Count] measure and place it in a Card visual. 

Count = COUNT('Table'[Category])+0

 

2. Create a measure for Card Text color.

Card Text Color = IF([Count]>0, "#FF000000")  // "#FF000000" is a fully transparent color

 

3. Create a measure for Card Background color.

Card BG Color = IF([Count]>0, "#FF000000", "#FFFFFF")

 

4. Conditionally format the Card visual's Callout value and Background based on above two measures. Turn off Category label. 

 

5. Move the Card visual over the Pie chart and adjust the visual size. Ensure the Card visual can fully cover the Pie chart when the Count is 0. 

 

Result:

When the count is not blank

vjingzhanmsft_0-1736479288369.png

When the count is blank or zero

vjingzhanmsft_1-1736479351456.png

You can group two visuals later. Group visuals in Power BI Desktop reports - Power BI | Microsoft Learn

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

3 REPLIES 3
v-jingzhan-msft
Community Support
Community Support

Hi @Earl40 

 

I agree with @Irwan. The Pie chart is to show how individual parts contribute to the whole. When the whole is 0, it cannot display 0 singly. 

 

The trick is to use a Card visual to display the count value 0. Then use conditional formatting feature to set up the background and text color of the Card visual. Place this Card visual over the Pie chart to indicate that there is no data. 

  • When the Count is not blank, set up the background and text to transparent color.
  • When the Count is zero, set up the background to white (the same background color of the pie chart) and set text to black (or other color as you like).  

 

Steps are:

1. Create a [Count] measure and place it in a Card visual. 

Count = COUNT('Table'[Category])+0

 

2. Create a measure for Card Text color.

Card Text Color = IF([Count]>0, "#FF000000")  // "#FF000000" is a fully transparent color

 

3. Create a measure for Card Background color.

Card BG Color = IF([Count]>0, "#FF000000", "#FFFFFF")

 

4. Conditionally format the Card visual's Callout value and Background based on above two measures. Turn off Category label. 

 

5. Move the Card visual over the Pie chart and adjust the visual size. Ensure the Card visual can fully cover the Pie chart when the Count is 0. 

 

Result:

When the count is not blank

vjingzhanmsft_0-1736479288369.png

When the count is blank or zero

vjingzhanmsft_1-1736479351456.png

You can group two visuals later. Group visuals in Power BI Desktop reports - Power BI | Microsoft Learn

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Ritaf1983
Super User
Super User

Hi @Earl40 

Could you please show what you expect to see in a situation where there is nothing in the visual based on the filters?
Do you mean a message to the user indicating that the result is 0, or something else?

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Irwan
Super User
Super User

hello @Earl40 

 

i am not sure if you can do this in pie chart.

if there is a pie, it means there is a value. But you can show zero in card visual that means you need to insert another visual.

Irwan_0-1736390109283.png

 

however, i think i have seen a trick to manage this but if you have many pies (make a separation or something) but i doubt it will work if you want to show one pie with blank value.

 

Hope this will help.

Thank you.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors