Forum Discussion
Newbie need help with Variance
- 3 years ago
You have to use SAMEPERIODLASTYEAR Function to find yoy comparison the way you want!
https://www.youtube.com/watch?v=L6kbQi7Mvpk&list=PLWQB3PEUJKRneu8fam5CaCMCdrIdT_zDD&index=2
Watch at 7:52 to find the formula usage. I suggest watch 1 and 2 of the same playlist to understand the outcome much better
The video explains what exactly you want ! First go thru and try and you will get the result as you required.
Hello VijayP,
Thx for the hint, I was able to get a column that shows the value of previous year, with
Last Year Value = CALCULATE (
Ranking[sum of values],
SAMEPERIODLASTYEAR ( 'Date'[Data] )
)
The problem is I probably didnt explain the requirement fully.
I would like to filter the table for 2 year and get the same result...
say I chose 2018 and 2020, or 2019 and 2022 , so its more previous value in the table (dynamicly sliced by the slicer in the page)...
I saw a solution that tried to index the rows and use Index - 1 to do the division...Problem is the same these indexes have to change as I slice the table...or this wont work as well. 😕
any further hints?