Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alina_qlik
Contributor III
Contributor III

Need logic for join for dimension drill down based on other table

Hello Experts ,

Even though i am new to Qlik but , i have learnt a lot from community about join , yet somehow not sure about below problem statement . Sorry in advance , if i have asked something "no brainier" . 

I have two tables , using which i need a resulting table which depicts dimension drill down .

Table 1 :

ClientProductTypeINCOMERegion
MerckCash200US
MerckCashX100US
MerckAUS Val100US
MerckLocal Draws25US
MerckBonds75US
MerckShare50US
MerckDebentures50US
INVCash300GB
INVCashX120GB
INVAUS Val180GB
INVLocal Draws60GB
INVBonds60GB
INVShare180GB

 

Table 2

Product Levl 1Product Levl 23Product Levl 1
CashCashXLocal Draws
CashCashXBonds
CashAUS ValShare
CashAUS ValDebentures

 

Resulting Table 

CorpRegionProductProduct Levl 23Product Levl 1INCOME
MerckUSCashCashXLocal Draws25
MerckUSCashCashXBonds75
MerckUSCashAUS ValShare50
MerckUSCashAUS ValDebentures50
INVGBCashCashXLocal Draws60
INVGBCashCashXBonds60
INVGBCashAUS ValShare180
INVGBCashAUS ValDebentures-

 

Thank You Qlikxperts ...

Attached file for reference .

3 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

this script should work 


LOAD Client,
ProductType,
Region
FROM
GRANULARITY.xlsx
(ooxml, embedded labels, table is [Table 1]);

 

Right Join
LOAD [Product Levl 1]as ProductType,
[Product Levl 2],
[3Product Levl 1]
FROM
GRANULARITY.xlsx
(ooxml, embedded labels, table is [Table 2]);

 

Left Join
LOAD Client,
ProductType as [3Product Levl 1],
INCOME,
Region
FROM
GRANULARITY.xlsx
(ooxml, embedded labels, table is [Table 1]);

alina_qlik
Contributor III
Contributor III
Author

Thank You StarinieriG .  Can similar join logic be used for second table where we have granularity like 

Product level 1 , 2, 3 , 4 , 5 .. 

 

StarinieriG
Partner - Specialist
Partner - Specialist

I think that it should work