Forum Discussion
dannyd
6 years agoFrequent Visitor
Subtracting between measurements
Hi, I'm struggling with this case for quite some time now, hopefully this community got some tricks up their sleves... So what i wanna do is calculate the savings by subtracting the price yea...
dannyd
6 years agoFrequent Visitor
Thanks for the quick answer Pravin!
What i was not to clear about was that the measures price1 and price2 are the same. Is it perhaps possible to add a filter to your code?
Thanks
az38
Community Champion
6 years agoHi dannyd
try to
Measure =
var _year1 = 2018
var _year2 = 2019
RETURN
(CALCULATE([price]; YEAR('Table'[Date])=_year1) - CALCULATE([price]; YEAR('Table'[Date])=_year2)) * CALCULATE(Count('Table'[Booking]))
do not hesitate to give a kudo to useful posts and mark solutions as solution