Hi, Every one i need help with one of the calculation where we need to calculate growth with respect to year 2019 inrespective of 2020 and 2022.Below is the calculation that i have been using
WINDOW_SUM(SUM([Val]),
CASE [Rolling Data Type]
WHEN "MTD" THEN -24
WHEN "R3M" THEN -26
WHEN "R6M" THEN -29
WHEN "R12M" THEN -35
END
, CASE [Rolling Data Type]
WHEN "MTD" THEN -24
WHEN "R3M" THEN -24
WHEN "R6M" THEN -24
WHEN "R12M" THEN -24
END)
there is some calculation done, in this we are calculating growth vs 2019 till dec 2021 data it was perfect but for 2022 data it is calculating the growth vs 2020. i want the growth from 2019 only even if the current year is 2022
I have wrote an LOD calcualtion to get 2019 Sales for all the years in the Database. Now you will get 2019 sales only for any month that you want to compare with. Using this you can recreate all the calculations and get what you want.
Check the below Tableau Public link for solution
Let me know if have any further questions