Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

divyanshi
New Contributor II

I want to match two columns with same name but differ by uppercase?

Hi,

I have two tables A and B. A has Customer Group while B has Customer Group Name.

I have customers of A only appear in my pivot table.

Since I need data from B table also but corresponding to only customers of A.

How to match customers of A and B ?

I am using

if ([Customer Group]=CUSTOMER_GROUP_NAME , [Customer Group])

But this gives only customers in Abbreviation like BCGH but not be able to map like 2degrees.

Kindly help.

Tags (1)
1 Solution

Accepted Solutions
luismadriz
Valued Contributor

Re: I want to match two columns with same name but differ by uppercase?

I'm talking something like this:

// Assuming TableB has been loaded

MappingTableB:

Mapping Load CUSTOMER_GROUP_NAME,OtherField

Resident TableB;

TableA:

NoConcatenate

Load *, 

     ApplyMap('MappingTableB', Upper([Customer Group])) as OtherFieldfromTableB

From ...;

8 Replies
luismadriz
Valued Contributor

Re: I want to match two columns with same name but differ by uppercase?

Hi,

Is there anything in common between the two tables?

Can you please share some screenshots of the data? or the data model?

If you're asking about ApplyMap, you still need values that are similar but the mapping tables needs to be prepared

Kind regards,

Luis

divyanshi
New Contributor II

Re: I want to match two columns with same name but differ by uppercase?

But I have to do mapping between two tables by keeping common Customer Group of table A and map also Customer Group of table A.

i.e. common and mapping column is same.

luismadriz
Valued Contributor

Re: I want to match two columns with same name but differ by uppercase?

Ok, please show me data so I can see what I can do...

divyanshi
New Contributor II

Re: I want to match two columns with same name but differ by uppercase?

Capture.PNG

Customer Group is the column in A and Customer Group Name in B.

I want to map Customer Group from table A into table B.

But these names like 2company ,Flying do not map whereas only A&P map.

luismadriz
Valued Contributor

Re: I want to match two columns with same name but differ by uppercase?

Ok, a Mapping Load with Uppercase should work fine.

What field do you want to bring from TableB into TableA?

luismadriz
Valued Contributor

Re: I want to match two columns with same name but differ by uppercase?

I'm talking something like this:

// Assuming TableB has been loaded

MappingTableB:

Mapping Load CUSTOMER_GROUP_NAME,OtherField

Resident TableB;

TableA:

NoConcatenate

Load *, 

     ApplyMap('MappingTableB', Upper([Customer Group])) as OtherFieldfromTableB

From ...;

pradosh_thakur
Valued Contributor III

Re: I want to match two columns with same name but differ by uppercase?

1:If in the script use Applymap() depending on your data structure.

2: In the UI use UPPER([Customer Group]) as your column .

3: May be try using mixmatch() for case insensitive comparision instead of IF.

regards

Pradosh

divyanshi
New Contributor II

Re: I want to match two columns with same name but differ by uppercase?

Sorry for replying so late but Thanks a lot

Community Browser