Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sharatj1989
Contributor III
Contributor III

Need to add new column for existing table which contain the combined data of two other column

I have a table Product_group, which contain 2 column

Product                         Product_2 

SPOT                                SPOT-T

FIX                                     ---------

TOM                                 ----------

SPOT                                 SPOT-T1

SPOT                                 SPOT-T2

i need to add third column DETAILED_PRODUCT which should look as below

  DETAILED_PRODUCT

         SPOT-T

          FIX 

        TOM    

       SPOT-T1

        SPOT-T2

where SPOT need to split in third column like where ever SPOT in Product column should be replace by Product_2.

Please help me with this. thank you

14 Replies
sunny_talwar

In that case, try this

If(Len(Trim(Product_1)) > 0, Product_1, Product) as Product_2
Gysbert_Wassenaar

Which is exactly what I posted above... except Product_2 has miraculously become Product_1 Smiley Surprised


talk is cheap, supply exceeds demand
sunny_talwar

🙂
sharatj1989
Contributor III
Contributor III
Author

Thank you so much for your response, It really helps for me

sharatj1989
Contributor III
Contributor III
Author

Thank you so much for your kind response, its really helpful for me. 

If in some case i need product_2 Value as SPOT+T when SPOT in product and NULL in Product_1

what i need to edit in the expression that you suggested.

product       Product_1   Product_2  

SPOT            NULL              SPOT+T