Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Help on an Expression

This is my sql output .I am loading in a QVD.

sQL.jpg

  I have to check the following condition in qlikview.

I will have Person_Key as Select field.

and In a expression i will check for that PersonKey:

if(QST_ID='1473' AND ANS_ID='6263','Y')

But Y is not getting displayed.

Any help?

7 Replies
Not applicable
Author

Try This



if(QST_ID='1473' or ANS_ID='6263',Y)

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Are your values text or numeric?

If they're numeric then removing the quotes may help - if(QST_ID=1473 AND ANS_ID=6263,'Y')

Not applicable
Author

Nope

Not applicable
Author

Hi Marcus,

I tried that too,

Its not working

Not applicable
Author

=if(QST_ID=1473 And ANS_ID=6263,Y)

Not applicable
Author

can you upload your sample

MayilVahanan

HI

Try like this

TableA:

Load *, if(QST_ID=1473 AND ANS_ID=6263,'Y', 'N') As Flag;

Select * from TableName;

Store TableA into TableA.qvd(qvd);

Then check in the TableA.qvd once.

Edit:

Note:

You have More rows for the single PersonId, If you need to check in expression,

Use PersonID, QST_ID, ANS_ID as dimension and Then use that in if(QST_ID=1473 AND ANS_ID=6263,'Y', 'N') in expression.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.