Forum Discussion

TheKiltedGolfer's avatar
TheKiltedGolfer
Icon for Helper III rankHelper III
7 years ago

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.

 

 

4 Replies

  • 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] )
    • TheKiltedGolfer's avatar
      TheKiltedGolfer
      Icon for Helper III rankHelper III

      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.

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        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.

    • TheKiltedGolfer's avatar
      TheKiltedGolfer
      Icon for Helper III rankHelper III

      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.  :(