Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Qlik Sense - If Expression giving different results

Hi all,

I have a dimension called VendorContactConflictFlag that only has the value 1 or is null.


When using the expression below for records that do not have a value of 1 (i.e. null values), it gives the correct outcome of 0.


IF(VendorContactConflictFlag=1,1,0)

When using the second expression for the same records, it does not evaluate correctly and gives a value of 'Yes'.

IF(VendorContactConflictFlag=1,'Yes','No')

Would appreciate any help on why this is happening!

Cheers,

Joel

Tags (1)
4 Replies
sureshqv
Esteemed Contributor III

Re: Qlik Sense - If Expression giving different results

did u chk with the variable name alrdy declared?  twice?

Cntrl+Alt+V

MVP
MVP

Re: Qlik Sense - If Expression giving different results

Can you put them side by side in your application and check what you get?

IF(VendorContactConflictFlag=1,1,0) & ' ' & IF(VendorContactConflictFlag=1,'Yes','No')

Do you still get 0 Yes?

Not applicable

Re: Qlik Sense - If Expression giving different results

Hi Sunny,

I get the correct answer when I paste your formula in (0, No). 

Not sure why this is the case - could you please enlighten me?

MVP
MVP

Re: Qlik Sense - If Expression giving different results

I have no idea, may be you had some not right? (Spelling mistake, Upper case/lower case issue)

If you now paste this -> IF(VendorContactConflictFlag=1,'Yes','No') it should give you no right?