Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

TY Vs LY Sales comparison status

Hi ,

We are comparing current year vs last year sales.

Here we need like if today(9/21/2017) sales is 100 and last year(9/21/2016) sales is 0 (or) today's sales is 0 and last year sales is 100 then we need to put the status as In-Active.

Please find the attached Sample requirement design.

Is it is possible by using if Condition.

Thanks...

3 Replies
sunny_talwar

In the script? Yes, may be like this

If([2017 Sales] = 0 or [2016 Sales] = 0, 'In-Active', 'Active') as Status

nareshthavidishetty
Creator III
Creator III
Author

Hi,

[2017 sales] is an sample column name and we need to derive sales dynamically based on year.

Thanks..

nareshthavidishetty
Creator III
Creator III
Author

Hi,

Any clue..

Thanks..