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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Concatenate null into result

Hello Team,

 

Here is my question. 

 

i have three fields migrated to one output field - data type is string

 

In data i have null, 1 like that

 

If i migrate , it showing as nullnullnull

 

I want them as one NULL ,   In case if it come as 1nullnull - it should result as 1 , null2null it should result as 2

 

I wrote a Tmap expression : 

row1.col1==null&& row1.col2==null&& row1.col3==null? "NULL":row1.col1+row1.col2+row1.col3 

 

but it result 1nullnull, i need them as 1 - if it gets data in three = it should result the sum as well !!!

 

(Or)

 

Tell me how can i convert NULL into 0 and do this concatenation ?

 

Help out !!

 

Thanks for your help in advance !!!!

 

 

Labels (2)
5 Replies
bhagyarekha
Creator II
Creator II

Hi

here your data type is string,so you are getting result as like that,strings will append,integer will get add give you the sum

you need to convert it into int again by using tconverttype,

Regards,

Rekha

 

 

bhagyarekha
Creator II
Creator II

hi

@prabuj27 

i have three fields migrated to one output field - data type is string

                  how you are doing this on what condition are you doing?

can you let us know full flow of your requirement and at last what datatype should be used

 

first your requirement was this right?

Value is 1, if it have value , Value is NULL, it have no value - tmap expression helppppp !!!!

 

if present requirement was continuation  for old question we need to do some changes

 

Regards

rekha

 

 

 

Anonymous
Not applicable
Author

@bhagyarekha 

  x (string)     y(string)        z (string)                      output ( string)

     null              null               null                              nullnullnull                                 

     null                1                   null                             1                               

     1                    4                   6                               11                                   

 

 

Result required:            nullnullnull      null   

                                      null1null           1

                                       146                11

 

 

This is what i need. can you give me a query ????  

(or)

Convert the null as 0 - i.e string to integer in the expression syntax - and get the result.  am okay in both ways .. but need the result0683p000009M4YU.png

 

Thanks in advance !!!!!!! 

 

 

                     

 

Anonymous
Not applicable
Author

@bhagyarekha 

 

x(str)    y(str)    z (str)             output ( str)              required output

null     null      null               nullnullnull                       null

1         null      null               1nullnull                            1

1          4          6                     11                                  11

 

Can you tell me a expression syntax to achieve this result ???

bhagyarekha
Creator II
Creator II

@prabuj27 

 

pfa might be useful

regards

rekha

 


test3_0.1.zip