Forum Discussion
Calculate difference between data of a 'baseline/reference' year/month and later year/month
- 7 years ago
Hi Cherie,
Thanks for your reply! Unforunatly I couldn't get your two measures to work, but I found an other solution via the seperate 2013 dataset I created. Via 'Lookupvalue' I get the 2013 values in the original dataset per site and month. After that, it was easy to create the difference calculation.
So issue solved. Thanks for your help!
Hi MartijnB
You may try to create the two measures like below.For example:
2013 = CALCULATE(SUM(Data[value]),FILTER(Data,YEAR(Data[date])=2013))
2018 =
CALCULATE (
SUM ( Data[value] ),
FILTER (
ALL ( Data ),
YEAR ( Data[date] )
= YEAR ( MAX ( Data[date] ) ) + 5
&& MONTH ( Data[date] ) = MONTH ( MAX ( Data[date] ) )
)
)
Regards,
- MartijnB7 years agoRegular Visitor
Hi Cherie,
Thanks for your reply! Unforunatly I couldn't get your two measures to work, but I found an other solution via the seperate 2013 dataset I created. Via 'Lookupvalue' I get the 2013 values in the original dataset per site and month. After that, it was easy to create the difference calculation.
So issue solved. Thanks for your help!
- v-cherch-msft7 years agoMicrosoft Employee
Hi MartijnB
Glad to hear you've solved it, please accept the reply as solution to close this thread.
Regards,