Forum Discussion
Anonymous
6 years agoNot applicable
Calcualte Difference/% Change between two rows.
Hi there, I have the following data: Date SPX Price Volume 7/9/2020 3152.05 4829020000 7/8/2020 3169.94 4927700000 7/7/2020 3145.32 4563700000 7/6/2020 3179.72 473645...
- 6 years ago
calerof , the correct version. Value replacement issue in my formula
Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))
amitchandak
Super User
6 years agoAnonymous ,
As a new colum
maxx(filter(table, [date] =earlier([Date])-1),[SPX Price])
As a measure
This Day = CALCULATE(max([SPX Price]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
This Day = CALCULATE(max([SPX Price]), previousday('Date'[Date]))
calerof
Impactful Individual
6 years agoHi amitchandak,
Your solution doesn't calculate the previous price if there is a gap between current date and the previous day of more than one day: