Forum Discussion
JBI
7 years agoFrequent Visitor
Difference Between Oldest and Latest Value
Good Day, I have a very simple problem that I can not solve. I simply want to get the difference between the most recent and the oldest value in a table (as Delta). I want to use the most recent ...
- 7 years ago
You should be able to calculate it with something along the lines of:
min PLS = VAR minDate = Calculate(MIN(claendar[{date]) , allselected(calendar)) return Calculate( sum([amount]) , calendar[date] = minDate )
JBI
7 years agoFrequent Visitor
Hi tex628,
SELECTEDVALUE doesn't work since it requires a column as a parameter and in my example the flag is created by a measure.
Do you know how to solve this problem without using measures to flag which two columns to use?
Thanks!
tex628
7 years agoCommunity Champion
You should be able to calculate it with something along the lines of:
min PLS =
VAR minDate = Calculate(MIN(claendar[{date]) , allselected(calendar))
return
Calculate(
sum([amount]) ,
calendar[date] = minDate
)