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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
TheKiltedGolfer
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
parry2k
Super User
Super User

@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] )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.  😞

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.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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