C
calculating additional data help
Hello,
I have a table with the following data below and trying to find a way to add
Spares automatically to the table whether via query, I am not sure how.
Original data:
Yr Mth Type Value
2008 1 939 30.8
2008 2 939 30.8
2008 3 939 30.8
2008 4 939 30.8
2008 5 939 30.8
2008 6 939 30.8
2008 1 940 1.5
2008 2 940 1.5
2008 3 940 1.5
2008 4 940 1.5
2008 5 940 1.5
2008 6 940 1.5
2008 1 950 5.0
2008 2 950 5.0
2008 3 950 5.0
2008 4 950 5.0
2008 5 950 5.0
2008 6 950 5.0
Add to original value:
Yr Mth Type Value
2008 1 Spare 1.9
2008 2 Spare 1.9
2008 3 Spare 1.9
2008 4 Spare 1.9
2008 5 Spare 1.9
2008 6 Spare 1.9
where Spare is 5% of the total value of 939, 940 and 950 on the same yr and
mth. Thanks
I have a table with the following data below and trying to find a way to add
Spares automatically to the table whether via query, I am not sure how.
Original data:
Yr Mth Type Value
2008 1 939 30.8
2008 2 939 30.8
2008 3 939 30.8
2008 4 939 30.8
2008 5 939 30.8
2008 6 939 30.8
2008 1 940 1.5
2008 2 940 1.5
2008 3 940 1.5
2008 4 940 1.5
2008 5 940 1.5
2008 6 940 1.5
2008 1 950 5.0
2008 2 950 5.0
2008 3 950 5.0
2008 4 950 5.0
2008 5 950 5.0
2008 6 950 5.0
Add to original value:
Yr Mth Type Value
2008 1 Spare 1.9
2008 2 Spare 1.9
2008 3 Spare 1.9
2008 4 Spare 1.9
2008 5 Spare 1.9
2008 6 Spare 1.9
where Spare is 5% of the total value of 939, 940 and 950 on the same yr and
mth. Thanks