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: 
jpjust
Specialist
Specialist

Expression help

All,

I have a expression as below.

I wanted to bring another field (eg., Userfield = EMEA) to the IF condition. I tried many different ways but it seems to be not working. The expression did not throw any error but I don't get the expected value.

Any help will be appreciated.

Num(
IF((license_type_enabled)='Token-based', IF(Userfield)='EMEA',
Sum({<[License Token Type]={"User*"}>}[License Allocated Tokens]),
Sum({<[License Token Type]={"Professional*"}>}[License Total Tokens]),
))
,'#,##0')

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your second If is the "then clause" for the first if.  You will get nothing if the first if is false.  I'm guessing instead you are instead trying to do an AND or OR. 

IF((license_type_enabled)='Token-based' AND Userfield='EMEA',

 

IF((license_type_enabled)='Token-based' OR Userfield='EMEA',

 

-Rob

 

 

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your second If is the "then clause" for the first if.  You will get nothing if the first if is false.  I'm guessing instead you are instead trying to do an AND or OR. 

IF((license_type_enabled)='Token-based' AND Userfield='EMEA',

 

IF((license_type_enabled)='Token-based' OR Userfield='EMEA',

 

-Rob