Forum Discussion

nsadams87xx's avatar
nsadams87xx
Helper III
7 years ago
Solved

Line Graph Displaying future dates

Hey everyone, I have a line graph that is using dates for the x axis and they are displaying into the future rather than stopping at what the current date is.  I want the graph to be drilled down to the month level but stop at the current month.  Now that green line is simply a measure that = 2.  I'm using it as a "benchmark."  If I remove that measure, the graph displays correctly.  I checked all of my queries and my date keys and dates including my date dimension (that I'm having Power BI manage) don't display any data further than the present date.  Any ideas as to why this graph is behaving like this?

 

 

 

  • nsadams87xx's avatar
    nsadams87xx
    7 years ago

    I figured out what was happening.  Instead of a measure, I made my benchmark line a column and made Power BI calculate the column's max value.

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi nsadams87xx 

     

    How is your date table created ? Is it upto the end of a calendar year or upto the current date?  Or is it upto the last date in your data table ?

     

    Please share the data of the tables and pbix  if possible in onedrive / google drive and post the link here to find a solution.

     

     

    Cheers

     

    CheenuSing 

     

    • nsadams87xx's avatar
      nsadams87xx
      Helper III

      Anonymous , my date table is up to the current date to a point.  I use a SQL query to restrict dates in between a specific date range.  So actually I should say I want my chart to stop 14 days prior to the current date.  14 days ago is my "current date" which without the "benchmark measure" the report is doing.

       

      Unfortunately I cannot share my .pbix file because there is confidential business/medical data in the report but if you need anything else, I'll do my best to provide applicable details.

       

      My date keys in my fact table are also restricted to 14 days ago, again using a SQL query to control this before the data comes into Power BI.  Here is a screenshot of my date table, sorted by descending date.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi nsadams87xx 

         

        The x-axis months are from Calendar table or anyother table ? If from calendar table it should not go beyond the months in Calendar table.

         

        Cheers

         

        CheenuSing