I am creating a POC for a mobile report which shows movements in the HRC (Steel) commodity price. I have a simple table of daily prices and would like to present cards showing today’s price, yesterdays price and the change between the 2.
I have created a calculated column called WhatDayIsIt:
VAR today = TODAY()
VAR rowdate = CALCULATE(SUM(‘DataTable’[Date]))
I’m then trying to create a measure that gives the change between the HRC price for Today and Yesterday.
“T/Y Delta = SUM(‘DataTable’[Asia HRC])-CALCULATE(SUM(‘DataTable’[Asia HRC]),PREVIOUSDAY(‘DataTable’[Date]))”
This works, but when i apply the WhatDayIsIt filter, the dates that i require a difference for is incorrect. I’m sure it has something to do with context, but i can’t crack it.
Any help would be greatly appreciated.