Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Apeksha
Contributor II
Contributor II

Urgent please help

I have attached  two tables one is input table and another is output table and I want whatever product is innovated beyond currentyear-4years range (ex- current year is 2021,  2021-4=2017 so , products innovated in 2016 or before should fall under non-innovation)  should be falling iñ non-innovation category in output table. How to do this in Qliksense.

Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra

@Apeksha  inline just indication or example

you can use

load Product,if(Year(today())-[Year of Innovation]<=4,[Year of Innovation],'Non-Innovation') as [Year of Innovation];
load * from ... your database

or in your interface

you can add dimension Product

and in measure if(Year(today())-[Year of Innovation]<=4,[Year of Innovation],'Non-Innovation')

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

4 Replies
Taoufiq_Zarra

@Apeksha 

for this input for example :

A,2016
B,2015
C,2016
F,2017

you can use this in load :

load Product,if(Year(today())-[Year of Innovation]<=4,[Year of Innovation],'Non-Innovation') as [Year of Innovation];
load * inline [
Product,Year of Innovation
A,2016
B,2015
C,2016
F,2017
];

the output:

Taoufiq_Zarra_0-1628243680165.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Apeksha
Contributor II
Contributor II
Author

Thank you for your help Taoufiq_zarra but inline load is not possible because no. of products falling in non-innovation category will be very large. If you know some other way Please help me.

Taoufiq_Zarra

@Apeksha  inline just indication or example

you can use

load Product,if(Year(today())-[Year of Innovation]<=4,[Year of Innovation],'Non-Innovation') as [Year of Innovation];
load * from ... your database

or in your interface

you can add dimension Product

and in measure if(Year(today())-[Year of Innovation]<=4,[Year of Innovation],'Non-Innovation')

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Apeksha
Contributor II
Contributor II
Author

Thank you so much