Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

creating new column based on two others

Dears,

I have one problem that I am tackling now and no solution serves it right, although probably it is very simple. Maybe you can help?

From two different sources I have two fields [Vendor name] and [Trading partner name] that are already mapped into one table.

Data looks now like this:

doc.           Vendor name          Trading partner name

1                     a                                   

2                     b

3                     c

4                                                           d

5                                                           e

I would like to get data like this:

doc.           Vendor name          Trading partner name      Vendor_final

1                     a                                                                  a

2                     b                                                                  b

3                     c                                                                  c

4                                                           d                            d

5                                                           e                            e

The following solutions do not work for sure:

if([Trading partner name]='',[Vendor name], [Trading partner name]) as Vendor_final,

or

if([Trading partner name]<>'' and [Vendor name] ='',[Trading partner name], if([Trading partner name]='' and [Vendor name] <>'',[Vendor name],'vendor not found'))
as Vendor_final

I will be grateful for any tip.

J.

1 Solution

Accepted Solutions
its_anandrjs

Hi,

I think you have to use

If( isnull( [Vendor name]) = -1,[Trading partner name] , [Vendor name] ) as Vendor_final

Rgds

Anand

View solution in original post

4 Replies
SunilChauhan
Champion II
Champion II

everywhere give  spacelike below  ex:' '  in place of ''

if([Trading partner name]=' ',[Vendor name], [Trading partner name]) as Vendor_final

hope this solve your problem

Sunil Chauhan
Not applicable
Author

It seems not to help. This function results in a Vendor_final column that has only [Trading partner name] as data; [Vendor name] data is not included.

its_anandrjs

Hi,

I think you have to use

If( isnull( [Vendor name]) = -1,[Trading partner name] , [Vendor name] ) as Vendor_final

Rgds

Anand

Not applicable
Author

Thank you. That works fine:)