Forum Discussion
Anonymous
3 years agoNot applicable
Previous value in DAX
Hello,
I would like to use two sets of values for one timestamp, i.e. [Date].
Thus, all values before today, including today, have to be equal to value3. All values after today have to be equal to MIN(value1, value2) + previous day's value. Thus, tomorrow's value = today's value + MIN(value1, value2) or something like that:
IF(([Date]) > Today(),
PrevValue + MIN(value1, value2),
value3
)
Could you please help with introducing the Previous Value into the calculation.
Could you please help with introducing the Previous Value into the calculation.
4 Replies
- FreemanZSuper User
hi Anonymous
try like:
VAR PrevValue =MAXX(FILTER(TableName,TableName[Date]=EARLIER(TableName[Date])-1),TableName[Value])