Forum Discussion

Gaurav_Lakhotia's avatar
Gaurav_Lakhotia
Helper III
5 years ago
Solved

Calculate Running Total

Hello,   I want to calculate the running total based on a measure.   Here is my measure, AmountE &2021 - Actuals = IF ( SUM ( 'PO_Data'[2021 - Actuals] ) = BLANK (), SUM ( '2021E'[Amount2021E...
  • Fowmy's avatar
    5 years ago

    Gaurav_Lakhotia 

    Change your 1st Measure as follows and try:


    AmountE &2021 - Actuals  = 
    
    SUMX(
        ALLSELECTED('MonthMapping'[Month],'MonthMapping'[Month Priority]),
        var __act = CALCULATE(SUM ( 'PO_Data'[2021 - Actuals] ) )
        var __2021e =  CALCULATE( SUM ( '2021E'[Amount2021E] ) )
        return
        IF( __act = BLANK (),  __2021e + __act , __act )
    )