Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiply two fields from different tables

Hello!! I need some help with multiplying data from two tables into one new field having one field in common between both tables.

I have Table1 with fields: [Machine] and [Speed] and Table2 with fields: [Machine] and [ProdHrs], I need to have a new field (in Table2) that has the product of [Speed] and [ProdHrs] for each record of [Machine].

Thanks!!

23 Replies
Miguel_Angel_Baeyens

Hello Ellen,

Try the following

Table1:// as your previous script MapTable: // It will be deleted from memory once the document has completed loadingMAPPING LOAD [Policy Number] [Issue Age]FROM inv11006.qvd (qvd) WHERE 1=1; // Where needed since loading from QVD file Table2:LOAD *, // all fields in record [Initial Face Amounts] * ApplyMap('MapTable', [Policy Number], 0) AS AgeFace, [Death Benefits] * ApplyMap('MapTable', [Policy Number], 0) AS DeathBenefitsFROM inv21006.qvd (qvd);


Hope that helps!

bullish35
Creator II
Creator II

Gracias Miguel! Muy amable.

Ellen

Not applicable
Author

Hi Oleg

I would love to read the article, but cannt find it on the site, could you please point me in the right direction.

Thanks

Andrew

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Andrew,

I can't blame you - it took me a while to find it. My only luck was to look under "your items", or I would be lost. Here is the link:

http://community.qlik.com/wikis/qlikview-wiki/using-mapping-instead-of-joining.aspx

enjoy!

Oleg