Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
b_zumdick
Contributor
Contributor

Comparison of periods

Hello,

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?

Can anybody help me?
Thank you in advance!

1 Reply
Anil_Babu_Samineni

Perhaps this?

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')))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)