Forum Discussion

Renef92's avatar
Renef92
Frequent Visitor
4 years ago
Solved

Having trouble retrieving the previous value

Hello all, 

 

My goal is to get to the previous value from my price column; based on the date downloaded column. I've added an index and have calculated the previous index using the selected index. 

The problem is that my previous price measure is returning the same value. Any ideas?

Prev Index =

var Ind = SELECTEDVALUE(Sheet1[Index])
var previn = CALCULATE(MAX(Sheet1[Index]), FILTER(ALL(Sheet1), Sheet1[Index] < Ind))

return
previn
 
Previous Price =
var Ind = SELECTEDVALUE(Sheet1[Index])

var previn = CALCULATE(MAX(Sheet1[Index]), FILTER(ALL(Sheet1), Sheet1[Index] < Ind))



return

CALCULATE(SUM(Sheet1[Price]), FILTER(Sheet1, previn)

)

 

 

 

6 Replies