Hi Community,
Suppose I have two inputs. The first inputs look like:
ID | Length |
myID1 | 45 |
myID2 | 34 |
myID3 | 23 |
myID4 | 76 |
myID5 | 23 |
The second input looks like:
BuildingID | Building | Area | Cost |
myID1 | 1 | 84.1 | 535.7 |
myID2 | 1 | 95.5 | 7938.2 |
myID3 | 1 | 58.3 | 7111.2 |
myID4 | 1 | 40.1 | 2910.6 |
myID5 | 1 | 14.8 | 660.9 |
myID1 | 20 | 0.6 | 8799.9 |
myID3 | 20 | 21.3 | 7387.1 |
myID4 | 20 | 82.6 | 2272.9 |
Now I want a summation of the Area and Cost to appear in the first input:
ID | Length | Area | Cost |
myID1 | 45 | 84.7 | 9335.6 |
myID2 | 34 | 95.5 | 7938.2 |
myID3 | 23 | 79.6 | 14498.3 |
myID4 | 76 | 122.7 | 5183.5 |
myID5 | 23 | 14.8 | 660.9 |
Note that the figures in bold are the sums of the IDs in that second table. For example, Area of myID3 = 58.3 + 21.3 - 79.6.
Thanks.
Solved! Go to Solution.
Summarize the second input by summing Area and Cost by ID, then Join it to the first dataset on ID!
Thank you.