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: 
Not applicable

Calculated Field from 2 Tables

hi

I have 2 tables :

Tbl1:

productID

Price

tbl2:

QTY

ProductID

I need to make field as Price*QTY= TOTAL SALES

i make other table as :

load price

from Tbl1;

join

load  QTY from Tbl2;

but is make many tables and cant make new field.......

how to join is ???

1 Solution

Accepted Solutions
sunny_talwar

May be try with the mapping load:

MappingTable:

Mapping

LOAD ProductID,

          QTY

FROM...

Tbl1:

LOAD ProductID,

          Price,

          Price * ApplyMap('MappingTable', ProductID) as [Total Sales]

FROM ....

View solution in original post

5 Replies
sunny_talwar

May be try with the mapping load:

MappingTable:

Mapping

LOAD ProductID,

          QTY

FROM...

Tbl1:

LOAD ProductID,

          Price,

          Price * ApplyMap('MappingTable', ProductID) as [Total Sales]

FROM ....

Not applicable
Author

How many mapping tables I can create ?

oknotsen
Master III
Master III

In theory unlimited.

So if you want to create 8000 mapping tables: Have fun.

May you live in interesting times!
Not applicable
Author

But

mapping table include only 2 columns

if i work with 10 Tables.....for any new field i need made new mapping table............

oknotsen
Master III
Master III

You need all those fields in calculations?

If not, use JOIN the tables instead.

May you live in interesting times!