

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sum multi field
hi
i have some data like below:
table 1:
Number |
---|
10 |
20 |
21 |
36 |
table 2:
value |
---|
100 |
98 |
54 |
69 |
i need the multiple of number and value for each record and after that i need sum of all of them
in this case formula should return:
6578
how can i do it
- Tags:
- sum()*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post expected image on the wall


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What formula have you used to calculate the product sum?
as with simple multiplication and addition it is not coming out 5390
100 | 10 | 1000 |
98 | 20 | 1960 |
54 | 21 | 1134 |
69 | 36 | 2484 |
6578 |


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry
yes i need 6578
i will edit it


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Omid,
Try:
Table1:
LOAD
RecNo(),
*;
LOAD * INLINE [
Number
10
20
21
36
];
Left Join(Table1)
LOAD
RecNo(),
*;
LOAD * INLINE [
value
100
98
54
69
];
Now we can get this straight table:
RecNo() | Number | value | Sum(Number*value) |
---|---|---|---|
6578 | |||
1 | 10 | 100 | 1000 |
2 | 20 | 98 | 1960 |
3 | 21 | 54 | 1134 |
4 | 36 | 69 | 2484 |
This gives a different answer to the one you were expecting so either I misunderstood what you wanted or you made an arithmetical error.
Hope this helps
Andrew

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mapping load also might work, similar to what effinty2112 provided:
MappingTable:
Mapping
LOAD RowNo() as Key,
Number
INLINE [
Number
10
20
21
36
];
Table:
LOAD RowNo() as Key,
value,
ApplyMap('MappingTable', RowNo()) as Number,
ApplyMap('MappingTable', RowNo()) * value as FinalNumber
INLINE [
value
100
98
54
69
];
