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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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