Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am fairly new to qlikview and I am trying to figure out the best way to tie data together. I am attaching documentation to give a better understanding of what I am looking at:
I have a file called ad_prod_orders.
Here is the data that this file contains:
Prod_Order Oper Mn_Hr Ma_Hr L_Costs OH_Costs Trans Date cost_comp_OH cost_comp_labr
101914 | 32 | 13.3333 | 0 | 450.67 | 75.6 | 6/18/2013 | 231 | 230 |
101914 | 34 | 27.6 | 9.2 | 932.69 | 156.13 | 8/29/2013 | 231 | 230 |
101914 | 36 | 6.3667 | 0 | 215.15 | 36.01 | 8/29/2013 | 231 | 230 |
101914 | 37 | 3.4333 | 3.4333 | 116.02 | 19.42 | 8/29/2013 | 231 | 230 |
101914 | 30 | 1.9667 | 0 | 66.46 | 11.13 | 8/29/2013 | 231 | 230 |
101914 | 31 | 3.4333 | 3.4333 | 116.02 | 19.42 | 8/29/2013 | 231 | 230 |
101914 | 38 | 18.1 | 0 | 611.64 | 102.35 | 8/29/2013 | 231 | 230 |
101914 | 61 | 50.6668 | 50.6668 | 1632.43 | 573.65 | 9/23/2013 | 261 | 260 |
101914 | 63 | 4.8 | 4.8 | 154.68 | 54.25 | 9/23/2013 | 261 | 260 |
So I load this table into qlikview.
I have another table called (ad_prod_hrs) that I need to connect to ad_prod_orders.
The table needs to be tied to prod_order and cost_comp_oh or cost_comp_labr
The ad_prod_hrs table will contain multiple rows for a prod_order_number with cost_comp.
For instance,
If the cost_comp in ad_prod_hrs is equal to cost_comp_OH or cost_comp_labr then we need all the records from ad_prod_hrs attached to that prod_order_number
What would be the best way to get this data connected?????
Orders:
Load *, Prod_Order as OrderID From ad_prod_orders ;
BridgeTable:
Load distinct Prod_Order as OrderID, cost_comp_OH as CostID From ad_prod_orders ;
Load distinct Prod_Order as OrderID, cost_comp_labr as CostID From ad_prod_orders ;
Hours:
Load *, cost_comp as CostID From ad_prod_hrs ;
HIC