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 to get stacked bar chart to show 0 for months with no data without messing up filter

Hello,

 

I have a stacked bar chart where there is no data for certain months. I am trying to figure out a  way to show the month with no data as 0 instead of just missing from the chart, without impacting my filter. If I do "show items with no data" it negates my date filter. Im looking to show data from 5/1/2024 - 12/31/24.  Thank you in advance

 

Earl40_0-1737746632955.png

 

 

IDDate ProcessedRequest Type

IDDate ProcessedRequest Type
1Tuesday, January 2, 2024A
2Wednesday, January 3, 2024B
3Wednesday, February 7, 2024B
4Friday, February 16, 2024A
5Monday, February 19, 2024A
6Sunday, March 3, 2024A
7Thursday, March 21, 2024B
8Thursday, April 4, 2024A
9Saturday, July 13, 2024B
10Thursday, July 18, 2024A
11Friday, August 9, 2024B
12Monday, August 12, 2024A
13Friday, October 11, 2024A
14Thursday, October 31, 2024A
15Wednesday, December 4, 2024B
16Thursday, December 5, 2024B

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @Earl40 
If you have a calendar table connected to the transactions table, the "Show items with no data" option should work while respecting the filters.

Ritaf1983_0-1737747962754.pngRitaf1983_1-1737747995977.png

I attached PBIX so you can follow

More information about how and why you need a calendar table in your data model is here :

https://radacad.com/do-you-need-a-date-dimension

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

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

View solution in original post

bchager
Super User
Super User

@Earl40 One way you might be able to solve this problem is by creating a measure like below. Use that instead of applying count to the ID column.

Show_Zero =
VAR _count = COUNT ( 'Table'[ID] )
RETURN IF ( ISBLANK ( _count ), 0, _count )

 

View solution in original post

3 REPLIES 3
bchager
Super User
Super User

@Earl40 One way you might be able to solve this problem is by creating a measure like below. Use that instead of applying count to the ID column.

Show_Zero =
VAR _count = COUNT ( 'Table'[ID] )
RETURN IF ( ISBLANK ( _count ), 0, _count )

 

Ritaf1983
Super User
Super User

Hi @Earl40 
If you have a calendar table connected to the transactions table, the "Show items with no data" option should work while respecting the filters.

Ritaf1983_0-1737747962754.pngRitaf1983_1-1737747995977.png

I attached PBIX so you can follow

More information about how and why you need a calendar table in your data model is here :

https://radacad.com/do-you-need-a-date-dimension

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

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

@Ritaf1983 thank you so much. Is it possible to show the month name instead for the number (January instead of 1)?

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