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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
MelissaRegnaud
New Member

Show a Zero for data within a date range that is not there?

Hello There!

 

A question regarding data within a date range slider. If I have data /records for dates 1 Jan , 2 Jan and 5 Jan for incidents that occur and no data for 4 Jan , is there a way to show this as 0 on the visualisation layer that 0 Incidents happened on that date if its not in the data? Something like within the date range of 31 Dec - 30 Jan ( as the slider) if no Date show 0 Value? 

 

I received the suggestion to add it into the data as in every single day that there is no incident add it in and make  it 0 for that date in the data file?

I would however prefer to have the change in the visual layer, If ..then... else... kinda of solution? rather than within the data file ? 

 

Best regards

Melissa

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @MelissaRegnaud,

 

Please create a calendar table first. Establish an active relationship between these two tables.

calendar = CALENDAR(DATE(2016,12,1),DATE(2017,5,31))

Add 'calendar'[date] into slicer. Add 'calendar'[date] and incident column into table visual. Enable to "show item with no data".

2.PNG

 

With this method, you can show blank for those records with no data. But cannot display a "0".

 

To display a "0", I think you have to add it into table view rather than visual layer.

Create a calculated table like below, and add columns from this table into slicer and table visual.

New table =
UNION (
    'Incident data',
    ADDCOLUMNS (
        EXCEPT ( VALUES ( 'calendar'[Date] ), VALUES ( 'Incident data'[Date] ) ),
        "incident", 0
    )
)

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @MelissaRegnaud,

 

Please create a calendar table first. Establish an active relationship between these two tables.

calendar = CALENDAR(DATE(2016,12,1),DATE(2017,5,31))

Add 'calendar'[date] into slicer. Add 'calendar'[date] and incident column into table visual. Enable to "show item with no data".

2.PNG

 

With this method, you can show blank for those records with no data. But cannot display a "0".

 

To display a "0", I think you have to add it into table view rather than visual layer.

Create a calculated table like below, and add columns from this table into slicer and table visual.

New table =
UNION (
    'Incident data',
    ADDCOLUMNS (
        EXCEPT ( VALUES ( 'calendar'[Date] ), VALUES ( 'Incident data'[Date] ) ),
        "incident", 0
    )
)

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.