Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative line chart break

Hello, I'm trying to make a cumulative chart with this code: YTD GP = CALCULATE( SUM(BIPER[GP]), FILTER( ALLSELECTED(BIPER), BIPER[Invoice Date] <= MAX(BIPER[Invoice Date]...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Actually I already has date dimension. The reason I use the current table's date is because I designed the goal for every working day at my company. So if I use the date dimension, the line for Goal will break. 

    I already find the solution and it works. So here's my new measure:

     

    YTD GP = 
    IF(MAX('CALENDAR'[Date])>TODAY(), BLANK(), 
        IF(MAX(ST[Date])=BLANK(), BLANK(),
            CALCULATE(
                SUM(BIPER[GP]),
                FILTER(
                    ALLSELECTED('CALENDAR'),
                    'CALENDAR'[Date] <= MAX('CALENDAR'[Date])
                )
            )
        )
    )

     

    Anyway, thank you parry2k !