Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a table in this format and need to find totals usage of all parts. please help.
Level Part Qty
1A1
2B5
3C3
4D2
2E1
3F1
Please note that is related to the hierarchical totaling For example the total qty required for Part C, which is at Level 3 and falls under Level 2 of Part B and level 1 of Part A, would be Part B qty X Part A Qty.
For Part D the total will = Part D (2) x Part C (3) X Part B (5) x Part A (1) = 30
Lower levels are parents of higher levels
In the example below Bearing Ball = Bearing Ball (10) x BB Bearing Ball (10) x HL Bottom Bracket (1) x Mountain 100 Black 38 (1) = 100
Another example is shown below.
Hi Imke
here is an example. The levels are used to create a parent child hierarchy. Lower number level parts are parents of those with a higher level number. i hope the example makes it clear.
can you explain one more time... if possible...
i have modified your data, as per below table.. how come your result...
Level | Part | qty |
1 | A | 1 |
2 | B | 5 |
3 | C | 3 |
4 | D | 2 |
2 | E | 3 |
3 | F | 3 |
3 | D | 5 |
2 | C | 2 |
1 | B | 2 |
Hi Imke
Part D is not totaling correctly with the code that you supplied. Can you please re check it?
LevelPartqty
1 | A | 1 |
2 | B | 5 |
3 | C | 3 |
4 | D | 10 |
2 | E | 2 |
3 | F | 1 |
3 | D | 5 |
Totally awesome and much more elegant. thank you 🙂
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |