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: 
Not applicable

Three if match statmenst in a row??

Hi,

I want to write a if match statement for three different values, the compiler does not giva any error but the table only shows Smoker after its created so the last values work. What am I doing wrong? Any tips?

if(Value=1 and (Match(CalculationIdentifier, 37,38)),'Smoker and Snuff user'),IF(Value=1 and (Match(CalculationIdentifier, 37)), 'Snuff user'),IF(Value=1 and (Match(CalculationIdentifier,38)), 'Smoker') as SmokeAndSnuffStatus,

13 Replies
swuehl
MVP
MVP

Have you read my comment(s) about trying to evaluate an AND status of field values based on a single input record?

rubenmarin1

Theodor, that logic won't work, for each record you have one value for CalculationIdentifier, it can be 37, 38 or any other value. If it is 37 or 38 it will return 'Smoker and Snuff user' and the other conditions won't be evaluated, for any other value it returns Null().

The logic to return Smoker and Snuff User should be to have CalculationIdentifier=37 and CalculationIdentifier=38, wich is not possible in only one record.

Maybe you need a second step to have all CalculationIdentifier's of one user in one record and then you can use the 'and' to check the users with both conditions.

Not applicable
Author

Hi Ruben I understand what you mean I can only have to IF states with the current values thanks

Not applicable
Author

Worked with two If statements thx the value I can calculate inside the table