I am comparing two tables and having a hard time getting desired results.
Would like to subtract the first dataset from the second data set.
Solved! Go to Solution.
Trying to get a simple variance that I would normally do in a pivot but Alteryx could save me some time when I have varying products. | ||||
Source 1 | ||||
O type | S type | Prod | Vol | Val |
BA | FED | COND | 45.34 | 43.29 |
BA | FED | GAS | 21.96 | 36.96 |
BA | FED | OIL | 498.49 | 498.49 |
BA | FED | PPROD | 87.23 | 42.29 |
BA | FED | STFED | 653.02 | 621.03 |
CP | OR | COND | 192.27 | 192.27 |
CP | OR | GAS | 65.59 | 10.43 |
CP | OR | PPROD | 2,556.79 | 2,556.79 |
CP | OR | STOR | 2,814.65 | 2,759.49 |
Source 2 | ||||
O type | S type | Prod | Vol | Val |
BA | FED | GAS | 20.78 | 34.62 |
BA | FED | OIL | 51.75 | 44.72 |
BA | FED | PPROD | 8,764.11 | 864.11 |
BA | FED | STFED | 8,836.64 | 943.45 |
CP | ORRI | GAS | 139.23 | 23.81 |
CP | ORRI | OIL | 964.83 | 964.83 |
CP | ORRI | PPROD | 4,472.23 | 4,472.23 |
CP | ORRI | STOR | 5,576.29 | 5,460.87 |
Desired Results | ||||
O type | S type | Prod | Vol | Val |
BA | FED | COND | -45.34 | -43.29 |
BA | FED | GAS | -1.18 | -2.34 |
BA | FED | OIL | -446.74 | -453.77 |
BA | FED | PPROD | 8,676.88 | 821.82 |
BA | FED | STFED | 8,183.62 | 322.42 |
CP | OR | COND | -192.27 | -192.27 |
CP | OR | GAS | 73.64 | 13.38 |
CP | OR | OIL | 964.83 | 964.83 |
CP | OR | PPROD | 1,915.44 | 1,915.44 |
CP | OR | STOR | 2,761.64 | 2,701.38 |
Any help appreciated, thank you! |
Second Dataset
O type | S type | Prod | Vol | Val |
BA | FED | GAS | 20.78 | 34.62 |
BA | FED | OIL | 51.75 | 44.72 |
BA | FED | PPROD | 8,764.11 | 864.11 |
BA | FED | STFED | 8,836.64 | 943.45 |
CP | ORRI | GAS | 139.23 | 23.81 |
CP | ORRI | OIL | 964.83 | 964.83 |
CP | ORRI | PPROD | 4,472.23 | 4,472.23 |
CP | ORRI | STOR | 5,576.29 | 5,460.87 |
Desired Results
O type | S type | Prod | Vol | Val |
BA | FED | COND | -45.34 | -43.29 |
BA | FED | GAS | -1.18 | -2.34 |
BA | FED | OIL | -446.74 | -453.77 |
BA | FED | PPROD | 8,676.88 | 821.82 |
BA | FED | STFED | 8,183.62 | 322.42 |
CP | OR | COND | -192.27 | -192.27 |
CP | OR | GAS | 73.64 | 13.38 |
CP | OR | OIL | 964.83 | 964.83 |
CP | OR | PPROD | 1,915.44 | 1,915.44 |
CP | OR | STOR | 2,761.64 | 2,701.38 |
Sorry for so many replies, I have tried to post this question for over 12 hours and Alteryx keeps flagging it, am I doing something incorrectly? Trying to compare two tables and having trouble, any help appreciated
Second Dataset
O type | S type | Prod | Vol | Val |
BA | FED | GAS | 20.78 | 34.62 |
BA | FED | OIL | 51.75 | 44.72 |
BA | FED | PPROD | 8,764.11 | 864.11 |
BA | FED | STFED | 8,836.64 | 943.45 |
CP | ORRI | GAS | 139.23 | 23.81 |
CP | ORRI | OIL | 964.83 | 964.83 |
CP | ORRI | PPROD | 4,472.23 | 4,472.23 |
CP | ORRI | STOR | 5,576.29 | 5,460.87 |
Desired results
O type | S type | Prod | Vol | Val |
BA | FED | COND | -45.34 | -43.29 |
BA | FED | GAS | -1.18 | -2.34 |
BA | FED | OIL | -446.74 | -453.77 |
BA | FED | PPROD | 8,676.88 | 821.82 |
BA | FED | STFED | 8,183.62 | 322.42 |
CP | OR | COND | -192.27 | -192.27 |
CP | OR | GAS | 73.64 | 13.38 |
CP | OR | OIL | 964.83 | 964.83 |
CP | OR | PPROD | 1,915.44 | 1,915.44 |
CP | OR | STOR | 2,761.64 | 2,701.38 |
@binuacs Thank you very much for your help!