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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping problem

I have two tables.

The first table has two fields:

MaterialKey,

ConvFactor

The second table has

MaterialKey,

Quantity

I need to get the second table to have a field that is "Quantity(from second table)   *  ConFactor(from first table) as ConvQuantity".

Can't seem to get this to work with mapping table.

Help!

Thanks,

Stephen

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Something like this (adjust to your data sources):

FactorMap:

Mapping LOAD MaterialKey,

    ConvFactor

From .....;

Data:

LOAD

     MaterialKey,

     Quantity,

     ApplyMap('FactorMap' , MaterialKey, 0) AS ConvFactor

From ... ;

The 3rd parameter of ApplyMap is the value to use if the MaterialKey cannot be found in the mapping table

Hope this helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

As mentioned by Jonathan

you can do

ApplyMap('FactorMap' , MaterialKey, 0)  * Quantity AS Converted_Quantity


while everything else being the same


Thanks