Forum Discussion

tanct's avatar
tanct
Regular Visitor
8 years ago
Solved

Running total

  Hello All, Would need your help in the DAX running total for the below scenario (running total for the MTD - month to date and PM - previous month):-     My Dax: RunningTotal =  VAR  ...
  • Zubair_Muhammad's avatar
    8 years ago

    Hello friend

    tanct

     

    This shall do it

     

    Cumulative  =
    SUMX (
        FILTER (
            ALLEXCEPT (
                'Data Source',
                'Data Source'[Reformat],
                'Data Source'[SH - Country  docum.]
            ),
            'Data Source'[Weekday] <= SELECTEDVALUE ( 'Data Source'[Weekday] )
        ),
        CALCULATE ( SUM ( 'Data Source'[Standard Quantity KG 3rd Party] ) )
    )