So i have two different queries as follows:
Query1
CPT Resource 1 2 3 4 5
2017-06-12 RM1 5.00 5.00 4.00 4.00 2.00
2017-06-12 RM2 3.00 6.00 4.00 7.00 4.00
2017-06-12 RM3 3.00 4.00 6.00 8.00 6.00
2017-06-13 RM1 3.00 7.00 5.00 3.00 5.00
2017-06-13 RM2 4.00 5.00 4.00 2.00 4.00
2017-06-13 RM3 2.00 4.00 5.00 2.00 7.00
2017-06-14 RM1 2.00 4.00 6.00 4.00 2.00
2017-06-14 RM2 6.00 5.00 4.00 5.00 2.00
2017-06-14 RM3 5.00 3.00 7.00 4.00 5.00
and
Query2
CPT Resource 1 2 3 4 5
2017-06-12 RM1 0.00 -2.00 0.00 0.00 -2.00
2017-06-12 RM2 -3.00 -3.00 0.00 0.00 0.00
2017-06-12 RM3 -1.00 -3.00 0.00 0.00 0.00
2017-06-13 RM1 0.00 -1.00 0.00 0.00 0.00
2017-06-13 RM2 0.00 -1.00 -1.00 -2.00 -2.00
2017-06-13 RM3 -2.00 -3.00 -1.00 0.00 0.00
2017-06-14 RM1 0.00 0.00 0.00 0.00 0.00
2017-06-14 RM2 0.00 -4.00 -3.00 -2.00 0.00
2017-06-14 RM3 0.00 -3.00 -1.00 0.00 -2.00
With these two queries how would I go about creating a new query that multiplies data from query1 with the corresponding number in query 2 that is in the same position based on that date, resource, and the hour (which are the headings 1, 2, 3, 4, and 5). I also want only positive numbers so the new data should be multiplied by -1.
If I do this by hand the new table should look like this:
Query3
CPT Resource 1 2 3 4 5
2017-06-12 RM1 0.00 10.00 0.00 0.00 4.00
2017-06-12 RM2 9.00 18.00 0.00 0.00 0.00
2017-06-12 RM3 3.00 12.00 0.00 0.00 0.00
2017-06-13 RM1 0.00 7.00 0.00 0.00 0.00
2017-06-13 RM2 0.00 5.00 4.00 4.00 8.00
2017-06-13 RM3 4.00 12.00 5.00 0.00 0.00
2017-06-14 RM1 0.00 0.00 0.00 0.00 0.00
2017-06-14 RM2 0.00 20.00 12.00 10.00 0.00
2017-06-14 RM3 0.00 9.00 7.00 0.00 10.00