Hoping can assist me on this. Sample file attached as well.
Loading info from SQL tables. Desire to sum up quantity of barrels by region, service type, customer, well and then calculate revenue generated from this. Cost table with Region, customer, service type and chemical along with sales price for that.
Also desire to calculate chemical cost same way. My issue is with joining of tables I get duplicated barrels quantity so it sums up incorrectly for revenue. If I separate which currently have then not able to get the chemical cost to total up correctly with pivot.
May be way off on load or calculations.
May need to provide more info. Please let me know if do.