Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
CJR
Contributor II
Contributor II

If Statement Set Analysis

Hi all, I'm trying to set up a dimension where if the field equals one of several values, then it = Category 1, if it equals another value, it is category 2, otherwise category 3. I've been trying the below but can't quite get it...any tips welcomed! Thanks!

if(match(Field1='A','B','C','D') ,'Category 1',
if(Field1={'E'},'Category 2',
'Other'
))

 

Labels (3)
2 Replies
Or
MVP
MVP

That's the wrong syntax all around:

For match, the syntax is Match(Field1,'A','B','C','D') with no equal sign.

Set analysis can only be used with aggregation functions, which this lacks. It's also missing the open and close brackets {< >}.

joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @CJR 

      I recommend you set up this on script in the Data Load editor. Creating a new dimension.

It would be a more elegant solution. Better performance and easier to implement.

Help users find answers! Don't forget to mark a solution that worked for you!