Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
summer18
Helper III
Helper III

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:

RT01.png

 

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

RT02.png

 

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)
                                           )
                                  )

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@summer18 , Please move the filter to the date table. All date-related stuff.

Like


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

 

Also, use Year, month, a week from date table in visuals

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @summer18 ,

 

It may be that the value of the week slicer does not match the filter condition in measure.

Could you share the sample pbix via cloud service like onedrive for business or share the sample data?

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@summer18 , Please move the filter to the date table. All date-related stuff.

Like


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

 

Also, use Year, month, a week from date table in visuals

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks @amitchandak , it works!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.