Forum Discussion
Pquinlan21
2 years agoFrequent Visitor
undefined
Hi, I am trying to get the previous timestamp value in each column so I can calculate the change over the previous hour. I have attached a screen shot of the columns. Each row of data is pulled on an...
AlexisOlson
Super User
2 years agoThis seems like a nice use case for OFFSET.
Prev_tsCST =
SELECTCOLUMNS (
OFFSET (
-1,
TableName,
ORDERBY ( TableName[tsCST], ASC )
),
TableName[tsCST]
)
The more traditional method would be to take a max over a filtered table:
MAXX (
FILTER ( TableName, TableName[tsCST] < EARLIER ( TableName[tsCST] ) ),
TableName[tsCST]
)