Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey everyone,
how can I cumulate the single values in my example over months in that way:
Month | single value | accumulated value |
January | 1,09 | 1,09 |
February | 1,45 | 2,54 |
March | 1,3 | 3,84 |
April | 2,1 | 5,94 |
Many thanks!
Hey @Anonymous ,
thx for your reply.
I try to put my request into concrete terms:
The column "month" in my example comes from a Date table (Calender with hierarchy) in my model.
"Single value" is a calculated measure.
Do you need more information?
Many thanks!
// Base measure of which the accumulated value
// is a variation.
[Base Value] = SUM( FactTable[Value] )
[Accumulated Value] =
var __lastVisibleDate = max( Calendar[Date] )
var __result =
calculate(
[Base Measure],
Calendar[Date] <= __lastVisibleDate,
allselected( Calendar[Date] )
)
return
__result
Best
D
Hey @Anonymous ,
thx for your reply.
I tried it and this was the result:
Any other ideas?
Stay healthy!
Hello again @all,
hope you're all well.
Unfortunately I still couldn't solve my problem.
Look at this table (all you can see here are measures):
My goal is to accumulate "Measure" in this table column by month. I've already tried the following (DAX formula by @Anonymous😞
"Soll without adj" is calculated as follows:
I think here is the problem. Maybe the problem is due to the fact that it is viewed across several years?
Aside "AR Rest 2018" all other measures refer to 2019.
But this is necessary because Measure is a kind of target value related to the previous year.
Would it help if I add an example pbix.-file here?
Thank you again for your help!
Kind regards!
Cakos
@Anonymous thx for you replay! 🙂
I don't quite understand what you mean.
Where do you see hard-coded values? I think I'm calculating with measures? Or what do you mean?
If what I'm going to do does not work in this way, what kind of other options do I have?
Like this?
This does not work either.
The problem is here:
I think Power BI accumulates the 2018 until 2019, but only 2019 should be accumulated in this case.
Measure = Soll without adj - IC AR 2019
Soll without adj = AR per month 2019 - AR Rest 2018
Can we adjust the formula to accumulate only the current year (in this case 2019)?
Kind regards!
Cakos
Looks like you're asking for a standard year-to-date measure... In such a case, it's much simpler:
// Calender must be THE date table
// in the model and marked as such.
[Measure YTD] =
calculate(
[Measure],
datesytd( Calender[Datum] )
)
Best
D
User | Count |
---|---|
60 | |
22 | |
18 | |
18 | |
16 |
User | Count |
---|---|
86 | |
54 | |
54 | |
38 | |
21 |