Forum Discussion

Suhel_Ansari's avatar
Suhel_Ansari
Helper V
3 years ago
Solved

Cumulative Sum less then Current Date

Hi All, I need the Cumulative Sum measure for the column based on the less then Current Date which means I want to add the colum "ST_Day_Duration" provided the Contract End Date is less then Today()...
  • v-yadongf-msft's avatar
    v-yadongf-msft
    3 years ago

    Hi Suhel_Ansari 

     

    Create a measure:

    Measure = 
    IF (
        MAX('Table'[Contract end date]) <= TODAY (),
        CALCULATE (
            SUM ( 'Table'[ST_Day_Duration] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Contract end date] <= TODAY ()
                    && 'Table'[Country] = SELECTEDVALUE( 'Table'[Country] )
            )
        )
    )

     

    Best regards,

    Yadong Fang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.