I would like to compare the sales of a selected period (for example, Oct. 2018 to April 2019) with the sales of the same period 1 year before, 2 years before and 3 years before. All the 4 sales values should be created as key figures (master elements). With which function can I create these key figures?
If(MonthName>=AddYears(Min(MonthName),-1) and MonthName<=AddYears(Max(MonthName),-1), '1 Year Before',
If(MonthName>=AddYears(Min(MonthName),-2) and MonthName<=AddYears(Max(MonthName),-2), '2 Year Before',
If(MonthName>=AddYears(Min(MonthName),-3) and MonthName<=AddYears(Max(MonthName),-3), '3 Year Before', 'More than 3 Year')))
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful