Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
aswinnar
Partner - Contributor III
Partner - Contributor III

Mapping one Field to multiple values?

Hi All, 

I have a requirement in my application where I need to be able to map products to a particular market. Right now we have two Markets, Market M and Market N. 

For my products A, B, C I need to map to Market M and Market N. Product B belongs to both Market M and Market N. 

 

ProductMarket
AM
BM
BN
CN

 

I have used applymap function to map the products to the market, however for Product B I am only getting Market M as a result. It is not mapping to Market N as well. Is there a way I can map to both markets? Is there another function that I would have to use? 

 

Labels (4)
1 Reply
Vegar
MVP
MVP

I would consider to keep the Product-Market table as a dimension table in your data model that is associated with your Product field. 

If that is not a solution that fits you then you would need to look at the concept of join.

Something like this.

LOAD * FROM MainTable;

Left join Product, Market FROM ProductMarketSource;

 

Please observe that if you are joining two markets to a Product row then you will end up with two Product rows, one per Market.