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

Load: Create new field based on 2 different files

Hi Community.

I know this is pretty much straight forward but I can't find anywhere with a good example..

I have 2 excels:

  • Tabla1
  • Table 2

Table 1:

Load

Cost

From...

Table 2:

Load

Values

From....

I need to create a field that does the following:

Cost * values.

If the fields had been in the same Load I wouldn't be bothering you at all...

Thank you.
Regards.

7 Replies
YoussefBelloum
Champion
Champion

Hi,

what is the link between these tables ? to make this multiplication you need to know which cost correspond to which value

Digvijay_Singh

Not sure how these two tables are associated, but I think applymap may help here if you have same ID associated with two tables, create map table using ID and Cost from first table and then get the cost in 2nd table by looking Id in 2nd table using applymap.

patriciousa
Creator II
Creator II
Author

They are associated by a Material ID.

sasiparupudi1
Master III
Master III

please post sample data or sample app

As already suggested above, applymap may be of use in this

patriciousa
Creator II
Creator II
Author

Here goes:

Table1:

MaterialIDCost
1400
2540
3420

Table2:

MaterialIDValues
12
210
35

I need a new field that does Cost*Values.

Thank you.

Regards.

sasiparupudi1
Master III
Master III

do like this

Map_Cost:

Mapping Load

MaterialID,

Cost

Resident Table1;

Table2:

Load

MaterialID,

Values,

ApplyMap('Map_Cost',MaterialID,0) * Values As CostValues

Resident Table2;

patriciousa
Creator II
Creator II
Author

What if the field is [Cost 2]?

What if the field was renamed? [Cost] as [Cost v2]

Thank you!.

Regards.