Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
hello,
I have a measure that calculates a sum of a column of the sales history table according to the month and the year chosen on two slicers month and year (doing conditions based on choosen month and year in a slicer) I want to make another mesure which makes me the accumulation of the first mesure when I choose several months knowing that the sum must be = the sum of the first measure month by month between a minimum month chosen and a maximum month chosen since on the month filter I have the possibility of choosing several months how can i do that?
it's as if I have to make a sum on the result of a function with entry of each function one month among the months chosen on the slicer total = function(minchosenmonth,chosenyear)+function(month2,chosenyear) ... function(maxchosenmonth,chosenyear
simple sum gives me wrong value
Thank you for any help
Solved! Go to Solution.
If the slicer is choosing a range of dates from your Date table then you could do
Total =
var summaryTable = ADDCOLUMNS( VALUES('Date'[Year month]), "@val", [Existing measure])
return SUMX( summaryTable, [@val])
If the slicer is choosing a range of dates from your Date table then you could do
Total =
var summaryTable = ADDCOLUMNS( VALUES('Date'[Year month]), "@val", [Existing measure])
return SUMX( summaryTable, [@val])
Hello,
It works! thank you very much !
@ouafaa , Not very clear
You can try a measure like
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hello,
Thank you for your help but it does not work.
My PBIX is too large and contains sensitive data, I will create a sample one juste like an exemple or juste copy some excpected results and will share it so you can see what i'm trying to do
Thank you again
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |