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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
iamflamingjune
Frequent Visitor

How do i plot a date with no values

I have a simple graph, which counts all issues logged on a specific day.

I filter the graph, showing the last 7 days worth of issues, however because there are no issues reported on these days, it doesnt move the date along..

 

So in the example below, 29th June was the last reported issue.. its now the 2nd July and i would like the graph to show zero values for the last few days... 

 

iamflamingjune_0-1593695140520.png

iamflamingjune_1-1593695309691.png

 

Ive got this ticked

iamflamingjune_2-1593695367789.png

Any advice would be appreciated

7 REPLIES 7
v-alq-msft
Community Support
Community Support

Hi, @iamflamingjune 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

 

Table:

b1.png

 

Calendar(a calculated table):

Calendar = CALENDARAUTO()

 

There is a relationship between two tables. You may create a measure as below.

Result = 
IF(
    ISBLANK(SUM('Table'[Number of issues])),
    0,
    SUM('Table'[Number of issues])
)

 

Today is 7/3/2020. So the range is 7/27/2020-7/3/2020.

b2.png

 

Best Regards

Allan

 

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

 

 

 

Thank you @v-alq-msft for taking the time to look into this.

Could you upload the pbix file, so i can reference the measures you have indicated above.

Will accept this as a solution, once i have had a chance to test.

Hi, @iamflamingjune 

 

I attached the file in the end. Hope it helps.

 

Best Regards

Allan

 

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

@v-alq-msft My data source is an excel spreadsheet, which i connect to it live from the workspace.
Im not able to create the calculated table for the date, as you show, that section is greyed out.

Is there a work around ?

I appreciate your patience.

Hi, @iamflamingjune 

 

I think you need to create a date table in the data source. It is unsupported to create a calculated table when using live connect mode.

 

Generally, your data model will contain a calendar table. It is better to aggregate data by year and month using columns of a calendar table (containing one row for each day) instead of extracting the date parts from a single column of type date or datetime in calculated columns. You obtain a model wherein all date attributes are included in a separate table making it easier to browse data using a generic client, and you can use special DAX functions that perform time intelligence calculations. Moreover, most of the time intelligence functions require a separate Date table to work correctly

 

Best Regards

Allan

 

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

jthomson
Solution Sage
Solution Sage

Add zero to your measure

Any advice on how i would do that... i have followed various tutorials with no luck

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.