Forum Discussion

steveborty's avatar
steveborty
Copper Contributor
Sep 10, 2023
Solved

Running Total for different products and stores

Hi everyone!   After a couple of days of trial and error I come to you for some help. I am trying to compute the running total of the sales (SLS) up to a certain week (expressed as year&week numbe...
  • SergeiBaklan's avatar
    Sep 10, 2023

    steveborty 

    Not sure what is desired output. With

    slsRT:=CALCULATE (
        SUM ( 'Sales'[SLS] ),
        FILTER (
            ALLEXCEPT ( 'Sales', 'Sales'[Product], Sales[Store] ),
            'Sales'[YEARWEEK] <= MAX ( 'Sales'[YEARWEEK] )
        )
    )

    it's like

Resources