Forum Discussion

powerbinoobster's avatar
3 years ago
Solved

Stop Line Graph from extending after the last data point?

I created a measure that calucales the running toal of my data. Count of Status YTD = IF( ISFILTERED('ECO'[Date Originated]), ERROR("Time intelligence quick measures can only be grouped or filte...
  • powerbinoobster's avatar
    powerbinoobster
    3 years ago

    Hey VahidDM,

     

    Your solution was almost there. You missed  the .[DATE] in the last IF. Also, if I have data in the month of septemebr, my line graph would stop at August. So what I did was add +30 to TODAY() and now it includes the data for septemeber. 

     

    Count of Status YTD =
    VAR _A =
    IF (
    ISFILTERED ( 'ECO'[Date Originated] ),
    ERROR ( "Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column." ),
    TOTALYTD ( COUNTA ( 'ECO'[Status] ), 'ECO'[Date Originated].[Date] )
    )
    RETURN
    IF ( MAX ( 'ECO'[Date Originated].[Date] ) > TODAY() + 30, BLANK (), _A )