Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

De-cumulative values by date

Hello,   I have a data set that contains a cumulative column (it is connected to the BI service so I am trying to avoid using a calculated column, ideally I need a DAX measure).   I need to produ...
  • Zubair_Muhammad's avatar
    8 years ago

    HI Anonymous

     

    Try this MEASURE

     

    Measure =
    VAR EarliestDate =
        CALCULATE ( MIN ( TableName[Date] ), ALLSELECTED () )
    VAR StartValue =
        CALCULATE (
            SUM ( TableName[Cumulative Values] ),
            TableName[Date] = EarliestDate
        )
    RETURN
        SUM ( TableName[Cumulative Values] ) - StartValue