Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
YanMin
Contributor III
Contributor III

If Statement in Set expression within table

Hi,

I have a problem with if statement in table column. So I have two condition(1) the calculation including specific brand (2)without those brands. Those two conditions are perfectly work seperately without if statement.

With following codes, it gives me 0 for all columns value. Did I use if statement incorrectly? MTSelection is just to identify the different selection and it is in separate table. 

Appreciate for help. Thank you.

YanMin_1-1622625677212.pngYanMin_2-1622625704364.png

 

 

 

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

Change If(MTSelection = 'Exclude' to If(GetFieldSelections (MTSelection) = 'Exclude'

View solution in original post

3 Replies
jwjackso
Specialist III
Specialist III

Change If(MTSelection = 'Exclude' to If(GetFieldSelections (MTSelection) = 'Exclude'

YanMin
Contributor III
Contributor III
Author

Hi,

Thank you for the answer. I have found the problem. The problem is in other area. But thanks a lot for the answer. Really appreciate it. Can I know the difference between simple if and if getfieldselection?

 

 

jwjackso
Specialist III
Specialist III

I use the GetFieldSelections() function to force a string to string comparison.