Forum Discussion
Anonymous
5 years agoNot applicable
Value difference by Date and categorial variable
Hi all I want to calculate the difference between values, based on the date as well as another categorial variable. All that should be displayed in a waterfall diagram (column Expected Result). ...
- Anonymous5 years ago
Hi Anonymous ,
Based on your description, you can do some steps as follows.
- Create a column to mark month.
Month = MONTH('Diff'[Date])2. Create a new measure.
Test Value =
var x1=MAXX(FILTER(ALL(Diff),[Month]=SELECTEDVALUE(Diff[Month])&&'Diff'[Cat]=SELECTEDVALUE(Diff[Cat])),'Diff'[Value])
var x2=MAXX(FILTER(ALL(Diff),[Month]=SELECTEDVALUE(Diff[Month])-1&&'Diff'[Cat]=SELECTEDVALUE(Diff[Cat])),'Diff'[Value])
return
x1-x2Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hi Anonymous ,
Based on your description, you can do some steps as follows.
- Create a column to mark month.
Month = MONTH('Diff'[Date])2. Create a new measure.
Test Value =
var x1=MAXX(FILTER(ALL(Diff),[Month]=SELECTEDVALUE(Diff[Month])&&'Diff'[Cat]=SELECTEDVALUE(Diff[Cat])),'Diff'[Value])
var x2=MAXX(FILTER(ALL(Diff),[Month]=SELECTEDVALUE(Diff[Month])-1&&'Diff'[Cat]=SELECTEDVALUE(Diff[Cat])),'Diff'[Value])
return
x1-x2
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hi, thank you very much for your help!! It worked perfectly 🙂
Thanks again!