Forum Discussion
Year on Year difference without date table
- 1 year ago
Hi LUCASM ,
To calculate the Year on Year (YoY) Difference and YoY Difference % without a date table, you can use DAX measures:
Create a measure for the previous year’s value:Value LY = VAR Prev_Year = MAX(Forecast[Year]) - 1 RETURN CALCULATE( [Total Value], FILTER( ALL(Forecast), Forecast[Year] = Prev_Year ) )Create a measure for the YoY Difference:
YoY Difference = [Total Value] - [Value LY]Create a measure for the YoY Difference %:
YoY Difference % = DIVIDE([YoY Difference], [Value LY], 0)This setup should give you the desired output with the values and their differences year over year.
Thank you!
Hi,
PBI file attached.
Hope this helps.
- LUCASM1 year agoHelper IV
That my friend is so very helpful.
Love this... - LUCASM1 year agoHelper IV
Hi Ashish_Mathur
I was excited to try your file.
However, although your data works mine does not and I cant see why.
Ive added my test data to your file and renamed my tables and calculations to a suffix2. I am getting zeros everywhere and I cant see why.
Just as a thought, how do you get your calculated Date column with no hierachy?
Ive reattached your file with my data- Ashish_Mathur1 year agoSuper User
Amend the relationship
- LUCASM1 year agoHelper IV
Schoolboy error, how annoying!
Thank you for your quick responce