Forum Discussion
merging tables on two columns
- Anonymous9 years ago
did you guys solve it with SQL after all?
If so, could I ask you to accept a solution for this post, so others can benefit from it anyway?
pxg638 why dont you create a new column, ie a key based on the combination of both the columns?
So I can create [Unit]&[Date] in both tables, that is simple enough, how would I then utilise that to create the change in allocation between jobtypes? Wouldn't a join on the new column simply leave lots of gaps where it didn't key up?
- vanessafvg9 years ago
Community Champion
pxg638 ah ok, tell me a bit more about the change in allocation, its not clear to me from your post (i might be a bit slow this morning)
- Anonymous9 years agoNot applicable
Hi pxg638
Could you provide column headers? I want to re-create your problem in Power BI to test a solution, I have in mind.
Thanks in advance.
Best
Martin
- pxg6389 years agoFrequent Visitor
Anonymous
Column headers failed to show on the original post, sorry! HTML failed me! So you have reporting date, volume, and unit for the first table, then configuration date, unitname, fraction T1 work and fraction T2 work (effectively) for the 2nd table.
I am simplying the reality here, but the principle is presented.
- pxg6389 years agoFrequent Visitor
So for January we do 1000 jobs. The unit is configured to do 50% type 1 and 50% type 2, so that gets 500 of the first, 500 of the second. The next month we also do 1000 jobs, but we have reconfigured the machine, so it now does 40% type 1 and 60% type 2, so I get 400 and 600 respectively. If I want to now sum my type 1 jobs, I'd like to know this unit did 900 type 1s and 1100 type 2s in the first two months.
That any clearer?