Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sunitha_chellaiah
Partner - Creator
Partner - Creator

Issue in linking two tables

Hi,

I am linking two tables based on key 

Trim(Replace("STORE",'Showroom','')) & PRODUCT & PRICE_BAND AS Stock_Key,

But some of the price bands are missing in one of the table. Due to which that pricebands are not coming in the value.

In screenshot, I want same price bands to be shown in both the columns (PRICEBAND_DIN & PRICE_BAND_STK_D).

How to get already the records.

 

sunitha_chellaiah_0-1654863554835.png

Thanks

Labels (4)
1 Reply
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @sunitha_chellaiah 

It sounds like you may need an intersection table to ensure you have all Price Bands for all keys.

On both of the tables you are joining, create the key as you are presently doing, but do not load the STORE, Product or Price Band fields - only have the key.

Then load an intersection table with just those fields concatenated from both tables:

Intersection:
LOAD
  Trim(Replace("STORE",'Showroom','')) & PRODUCT & PRICE_BAND AS Stock_Key,
  Trim(Replace("STORE",'Showroom','')) as STORE,
  PRODUCT,
  PRICE_BAND
FROM ... your DIN table ...;

CONCATENATE(Intersection)
LOAD
  Trim(Replace("STORE",'Showroom','')) & PRODUCT & PRICE_BAND AS Stock_Key,
  Trim(Replace("STORE",'Showroom','')) as STORE,
  PRODUCT,
  PRICE_BAND
FROM ... your STK table ...;

There may be other fields that should reside in the intersection table also, that do not have to be part of the key.

Hope that makes sense?

Steve