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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Correct_Answer
Contributor III
Contributor III

Need to combine two field values to one field with condition.

Hello Team,

Can any one help me on this, I have 2 fields present in my dataset, Please find the below example,

Correct_Answer_0-1622570774423.png

and I want to make it as one field like if (Order ID1 is not blank then orderID1 else orderID2.

 

expecting output like below.

Correct_Answer_1-1622571142845.png

 

 

Thanks in Advance

 

Labels (1)
2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Best to do this in the load script. 

if(len(orderID1) > 0, orderID1, orderID2) as SalesOrderId

If the fields are in different tables and you have questions about how to go about it, please post an image of your data model.

-Rob

Nolgath
Creator
Creator

Thank you so much, you solved my problem in such a simple way, thank you Rob.

Wish you all the best, cheers.