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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Running Total unabled while clicking on specific month

Hello everyone! 

I'm facing a huge trouble while writing a DAX code for my PBI Report.

 

As you can see in the images when there's no month filter applied it computes correctly the Amount until May. However, whenever I click on any month in the report, it computes the clicked month value, instead of the running total until that month.

 

For example, if I click on April, instead of computing the values of Jan + Feb + Mar + Apr, it shows only the value for April.

If any kind heart can help me with that I would be really greatful. 🙂

without applying month contextwithout applying month contextwhish to have running total until the selected monthwhish to have running total until the selected month

3 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

You forgot the FILTER(ALL()) part when you specify all the previous months.

View solution in original post

Anonymous
Not applicable

@lbendlin could u help me with the continuing answer? Tks and best regards!

View solution in original post

here's the pseudo code:

 

var currentmonth = selectedvalue(month)

return calculate(your calculations, filter (all(dates),dates[month]<=currentmonth))

 

Note: you may need to add a year filter if you have data for more than one year.

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

You forgot the FILTER(ALL()) part when you specify all the previous months.

Anonymous
Not applicable

Hi, Ibendlin! Thank you so much for the help! But, could you be more specific? How would you approach this problem? 

FILTER ( ALL ( DATA ) ) or FILTER ( ALL ( DATA) , DATA[MONTH] = 1 || DATA[MONTH] = 2 ....?

Anonymous
Not applicable

@lbendlin could u help me with the continuing answer? Tks and best regards!

here's the pseudo code:

 

var currentmonth = selectedvalue(month)

return calculate(your calculations, filter (all(dates),dates[month]<=currentmonth))

 

Note: you may need to add a year filter if you have data for more than one year.

Anonymous
Not applicable

now it's worked perfectly!

Many tks!!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.