Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 context
whish to have running total until the selected month
Solved! Go to Solution.
You forgot the FILTER(ALL()) part when you specify all the previous months.
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.
You forgot the FILTER(ALL()) part when you specify all the previous months.
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 ....?
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.
now it's worked perfectly!
Many tks!!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |