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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Tmap if else rexpression for multiple collums

Hello, I have six collums col1, col2, col3, col4, col5, col6 and i need to map them.

 

Example from col4 i have to map to cod2 colum but if the col4 is null or empty i sould get the data from col5 if is not null, but if its col5 is null i have to get it form col3.

 

How and i do this in tmap with a expression.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi

 

(col4 != null && !coll4.isEmpty() ) ? col4 :

(col5 != null && !coll5.isEmpty() ) ? col5 : col3

 

Good luck,

SGV

View solution in original post

2 Replies
TRF
Champion II
Champion II

Here is the required expression:

 

row1.col4 != null && !"".equals(row1.col4) ? row1.col4 :
      row1.col5 != null ? row1.col5 : row1.col3

 

Hope this helps

Anonymous
Not applicable
Author

Hi

 

(col4 != null && !coll4.isEmpty() ) ? col4 :

(col5 != null && !coll5.isEmpty() ) ? col5 : col3

 

Good luck,

SGV