Forum Discussion

attempt1's avatar
attempt1
Frequent Visitor
1 year ago
Solved

Issue with Cumulative Sum Measure

Hello,   My measure to calculate the cumulative sum of rows (excluding rows where the 'End' column date has past) is not working as intended in my stacked column chart when no slicer filter is sele...
  • hnguy71's avatar
    hnguy71
    1 year ago

    Hi attempt1 ,

    try this:

     

     

    all_data_cumulative = 
    
    VAR _CurrDate = MAX('date_table'[Date])
    
    RETURN
    
    CALCULATE(
        COUNTROWS('all_data'),
        KEEPFILTERS(
            'all_data'[Start] <= _CurrDate &&
            'all_data'[End] > _CurrDate
        ),
        ALLSELECTED(date_table)
    )

     

    This may be your expected output: