Skip to main content

New to Qlik Sense

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

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
cancel
Showing results for 
Search instead for 
Did you mean: 
tenementfunster74
Contributor II
Contributor II

date comparison and condition-checking within IF function

Hi all,

i am having trouble with date comparison and condition-checking within the IF function.

What i would like to do is perform comparison between two dates, check for a specific condition (if my salesman has any opportunities open) and then based on that return the required text:

if( max(date([Opportunity Created Date])) >= max(date([Opportunity Close Date])) and [Opportunity Status] = 'OPEN',
'Client engaged', 'Client not engaged' )

Another challenge I have here is that when the function checks for the second condition, it returns TRUE if all opportunities of my salesman in question are open, but what would suffice is to have at least one opportunity open. How should I correct my function to enable date comparison and establish the correct logic for the second condition?

 

Here's a snippet of the table I'm using.

tenementfunster74_0-1614676651034.png

 

Thank you!

 

 

3 Replies
NitinK7
Specialist
Specialist

try to convert same date format

if( max(date([Opportunity Created Date],'DD/MM/YYYY')) >= max(date([Opportunity Close Date],'DD/MM/YYYY')) and [Opportunity Status] = 'OPEN',
'Client engaged', 'Client not engaged' )

tenementfunster74
Contributor II
Contributor II
Author

Thank you, but that didn't do the trick, unfortunately.

NitinK7
Specialist
Specialist

can you send you data in excel file with expected output