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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to concatenate 2 columns of string data type - 1 and 3 to result 4 in output

x(str)     y(str)        z(str)                     Output (str)           RequiredOutput

null         1              null                       null1null                         1

1             2               3                            123                             6

 

Query used: 

 

row1.x==null && row1.y==null && row1.z==null ? 0:row1.x+row1.y+row1.z

 

Someone help to get the required output ??

 

Thanks in Advance.

Prabuj

 

 

 

 

 

 

Labels (3)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

4 Replies
TRF
Champion II
Champion II

As soon as input fields are strings, the + operator is for concatenation, not for addition.

If the expression is used in a tMap component, you should use local variables to simplify it (1 local for each input field to convert from string to int and deal with null values).

Anonymous
Not applicable
Author

@TRF exactly as you said, can you show some example how it can be done or any link to refer
TRF
Champion II
Champion II

Start with this:0683p000009M4Z3.png

Anonymous
Not applicable
Author

@TRF awesome, made my day !!!