I have a question about joining two tables with data, eventually to be able to make a cost calculation for a production company for packed vegetables which produces bags of vegetables:
- In the example, they produce 1 type of vegetable in bags with different weights
- Some costs are the same for every weight: fixed costs per bag
- Some costs are related to the weight: variable costs per bag
- Also the amount of bags per box are related to the weight and thus the costs per unit for the box itself
- I have one table with fixed costs and one table with variable costs: the table with variable costs has got more columns
- By putting together with an 'Union' a dataset is created in which the value for 'Weight per unit' and 'Amount per box' is 'null' for the rows from table 1
- But the problem is: these costs are valid for all 'weight per unit's.
- If add a worksheet and put the weights in columns, the costs in rows, then I get one column 'Null' with the values of the fixed costs and several columns with the weights with the values of the variable costs
- How can I fix this? Is this possible within Tableau?
Thanks in advance for the reply!
Table 1: fixed costs > they are for all the products the same, however I want to be able to calculate a positive and negative scenario
|PRODUCT CODE||SCENARIO||TYPE OF COST||CATEGORY OF COST||COST PER UNIT (EUR)|
Table 2: variable costs > they are different for each different bag (200g, 300g, 500g) because they are related to the weight. This influences not only the cost per unit, but also the amound of packagings which can be stored in a cardboard box. Also in this table, a positive and negative scenario is included.
|PRODUCT CODE||WEIGHT PER UNIT (g)||SCENARIO||AMOUNT PER BOX|
TYPE OF COST
|CATEGORY OF COST||COST PER UNIT (EUR)|