When it comes to time intelligence in DAX, there are always a ton of different ways to accomplish the same thing. Here’s just one approach via 3 separate measures:
Today's Price =
CALCULATE(
SELECTEDVALUE( 'HRC Data'[Price] ),
Dates[Date] = TODAY()
)
Yesterday’s Price =
CALCULATE(
SELECTEDVALUE( 'HRC Data'[Price] ),
Dates[Date] = TODAY() - 1
)
Price Diff =
[Today’s Price] - [Yesterday’s Price]
I hope this is helpful. Full solution file posted below.
- Brian
eDNA Forum - Today and Yesterday Prices Solution.pbix (61.4 KB)