Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
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')))

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)