Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sidhiq91
Specialist II
Specialist II

If statement

Hi Guys,

I want to give 2 conditions in a single IF Statement. Below is the query that I have used in my script, but I'm not getting the desired result that I need.

If([Report Due Date]>Date([End Date]+12) and  IsNull([Target Group Conversion / Converted Customers]),'Not updated','Updated') as [Report Status],

Can anyone of you have a look at it and let me know the correct query?

Basically what I wanted to know is if [Report Due date] has crossed the [End date] by 12 days and if the [Target group conversion/Converted Customers] column is null then I need the [Report Status] column be shown as 'Not updated'

Regards,

Sidhiq

3 Replies
Mark_Little
Luminary
Luminary

Hi,

I would approach like this

If(NUM([Report Due Date]) > NUM([End Date]+12) AND LEN(TRIM(([Target Group Conversion / Converted Customers])))=0,'Not updated','Updated') as [Report Status],

Numbers are easier to work with than dates and checking the length of a field is normally more successful that isNULL, as account so spaces in the field.

Mark

sidhiq91
Specialist II
Specialist II
Author

Hi Mark,

Thanks a ton. Its working fine now.

Best Regards,

Sidhiq

avinashelite

If you got the answers , mark the correct answer and close this thread