Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jwheatonumich
Contributor II
Contributor II

How can I load a field based on the value in a second field?

I have the following data source:

ProductParentPrice
Product A1
Product BProduct A2
Product C3
Product DProduct A4

I would like to load the following table into QlikView:

ProductParentPriceParent Price
Product A1
Product BProduct A21
Product C3
Product DProduct A41

I can't figure out how to load the parent price field. Any help would be greatly appreciated.

1 Solution

Accepted Solutions
ychaitanya
Creator III
Creator III

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;

View solution in original post

2 Replies
ychaitanya
Creator III
Creator III

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;

uacg0009
Partner - Specialist
Partner - Specialist

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