cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

My line graph will not show blank data for dates

My simple line graph is not showing all of the data that I want. I need the X axis to show 24 scrolling months of dates where the most recent scrolling 12 months will always have data but the first scrolling 12 months will always be blank (NOT Zero).  My line graph ONLY shows dates going back 12 months and not 24.  My slicer is for the last 24 months.  When I click on “Show Data” for the line graph is shows everything for the past 24 months including the first 12 months being blank, which is correct because I am just graphing a scrolling 24 months.  If I adjust the X Axis “Start” date setting, under the paint roller,  to a 24 months back THEN the line graph is correct and see the last 24 months.  However, I need this to be automated and I do NOT want to have to change this setting every day.  Is there a way to put a formula into the “Start” date setting for the X Axis?  Does anyone know what in the world is going wrong?  The blank data for the first 12 months is there but it will not show them on the graph.  See picture attached.LineGraph.JPG

 

 

4 REPLIES 4
Super User IV
Super User IV

@TheKiltedGolfer change the measure for your line graph to return 0 instead of blank.

 

assuming your line meause is called "measure" you can do something like this, it will force to show value for 0 and you will see the line.

 

measure = if (ISBLANK[Measure], 0, [Measure] )





Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





I really do not want it to show "0" on the line graph because that really is not the value. It needs to be blank and just have a data line starting 12 months ago to the present day.  Showing a "0" means something different to me than a blank for a date.

@TheKiltedGolfer well in case you don't want to show "zero" i don't think line is going to get plotted for blank value. I don't see any solution here.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





The strange thing is that when I was pulling in the data from Excel the graph would work. But we are not pulling straight from SQL database and it is not working.  😞

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors