Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

DECODE function

Hello,
I would like to implement a decode function.
e.g.
DECODE (al1.dcf_status,
'PART RECEIVED', 'RECEIVED',
al1.dcf_status
)
when I define an expression like:
row1.DCF_STATUS =="PART RECEIVED"?"RECEIVED":row1.DCF_STATUS
it does not work.
Why?
Any ideas??
Thanks
Didier
Labels (2)
4 Replies
Anonymous
Not applicable
Author

Hello
row1.DCF_STATUS =="PART RECEIVED"?"RECEIVED":row1.DCF_STATUS

If the filed type is a String, change to the following expression:
row1.DCF_STATUS.equals("PART RECEIVED")?"RECEIVED":row1.DCF_STATUS
Best regards

shong
Anonymous
Not applicable
Author

Is this syntax correct for 3 values:
row1.DCF_STATUS.equals("VERIFIED")?1 0683p000009MPcz.pngrow1.DCF_STATUS.equals("CLOSED")?1 0683p000009MPcz.pngrow1.DCF_STATUS.equals("RECEIVED")?1:0))
thanks
Didier
Anonymous
Not applicable
Author

Hello
Is this syntax correct for 3 values:

Yes, you can 0683p000009MACn.png
Best regards

shong
DSingh1654264730
Contributor
Contributor

Could you please​ tell me why we are using ( :row1.DCF_STATUS ) in last.