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
Anonymous
Not applicable

line chart - display blank data

Good Afternoon,

 

I'm trying to create a line chart based of the below example data to plot tickets raised each day.

 

The issue I'm having is that when no tickets are raised on a particular date the value isn't set to 0.

How can i achieve this?

Untitled.png

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a calendar table and create a relationship between the two tables based on date column.

Create measure like this:

Measure = IF(ISBLANK(SUM('Table'[Value])),0,SUM('Table'[Value]))

Sample .pbix

 

Best Regards,
Liang
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

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a calendar table and create a relationship between the two tables based on date column.

Create measure like this:

Measure = IF(ISBLANK(SUM('Table'[Value])),0,SUM('Table'[Value]))

Sample .pbix

 

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

amitchandak
Super User
Super User

@Anonymous , Change the axis type to categorical. Another way put marker so that is known that data is not there on those days.

 

+0 in the calculation is a bad option to have, it will even remove date filter.

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Add a date dimension/calendar table as below if you haven't.

https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns

 

If you have a table with only closed records then create a measure like:

Measure = COUNTROWS( closedTable )

if you have more statues in this table then:

Measure = COUNTROWS( CALCULATETABLE( Table, Table[status]= "Closed" ) )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

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.