Forum Discussion

summer18's avatar
summer18
Icon for Helper III rankHelper III
6 years ago
Solved

Running Total not working when selecting in Week filter/slicer

I have running total by week chart and legend by Year. I have few slicers and when I filter on those slicers they work fine except for filtering by Week which goes back to normal sum instead of running total.

Running total:

 

When filtering by Week slicer, the chart turns to normal sum:

 

Here are the formulas I tried:


Running total in Fiscal Week =
             CALCULATE(
                          SUM('Sales'[Amount]),
                          FILTER(
                                      ALLSELECTED('Sales'[Fiscal Week]),
                                      ISONORAFTER('Sales'[Fiscal Week], MAX('Sales'[Fiscal Week]), DESC)
                                      )
                           )

 

Running total in Week =
                      CALCULATE(
                                SUM('Sales'[Amount]),
                                FILTER(
                                           ALLSELECTED('Sales'[Fiscal Week]),
                                           ('Sales'[Fiscal Week]<=MAX('Sales'[Fiscal Week]), DESC)
                                           )
                                  )

3 Replies