Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following data source:
Product | Parent | Price |
---|---|---|
Product A | 1 | |
Product B | Product A | 2 |
Product C | 3 | |
Product D | Product A | 4 |
I would like to load the following table into QlikView:
Product | Parent | Price | Parent Price |
---|---|---|---|
Product A | 1 | ||
Product B | Product A | 2 | 1 |
Product C | 3 | ||
Product D | Product A | 4 | 1 |
I can't figure out how to load the parent price field. Any help would be greatly appreciated.
you can try like this
Prod_Price_Map:
Mapping Load Product, Price
from Source_Table;
FACT:
Product,
Parent,
Price,
ApplyMap('Prod_Price_Map',Parent) as Parent_Price
from Source_Table;
you can try like this
Prod_Price_Map:
Mapping Load Product, Price
from Source_Table;
FACT:
Product,
Parent,
Price,
ApplyMap('Prod_Price_Map',Parent) as Parent_Price
from Source_Table;
Hi Heaton,
I think a "left join" can make this happen. like:
table1:
LOAD * INLINE [
Product, Parent, Price
Product A, , 1
Product B, Product A, 2
Product C, , 3
Product D, Product A, 4
];
Left Join
LOAD Product as Parent,
Price as [Parent Price]
Resident table1;
Result is what you want.
Thanks.
Aiolos