I have a case where I would need to merge 2 tables or add anyhow records from a second table to a main table when the row in the 2nd is not existing in the main. To explain, I have a series of hours recorded by month/year records, not all months are present, while for having clean dataseries I would need ALL months, if recorded with the correct hours, otherwise a row with 0. Something like:
This is the recording table This is the complete table This should be the outcome
WO ID Date Hrs WO ID Date Hrs WO ID Date Hrs
A 1 01-01-20 4 A 1 01-01-20 0 A 1 01-01-20 4
A 1 01-02-20 8 A 1 01-02-20 0 A 1 01-02-20 8
A 2 01-03-20 3 A 1 01-03-20 0 A 1 01-03-20 0
A 2 01-04-20 4 A 1 01-04-20 0 A 1 01-04-20 0
B 1 01-01-20 6 A 1 01-05-20 0 A 1 01-05-20 0
B 1 01-02-20 2 A 1 01-06-20 0 A 1 01-06-20 0
B 1 01-03-20 3 A 1 01-07-20 0 A 1 01-07-20 0
B 6 01-02-20 8 A 1 01-08-20 0 A 1 01-08-20 0
B 6 01-03-20 5 A 1 01-09-20 0 A 1 01-09-20 0
B 6 01-04-20 3 A 1 01-10-20 0 A 1 01-10-20 0
B 6 01-05-20 7 A 1 01-11-20 0 A 1 01-11-20 0
B 6 01-06-20 4 A 1 01-12-20 0 A 1 01-12-20 0
A 2 01-01-20 0 A 2 01-01-20 0
A 2 01-02-20 0 A 2 01-02-20 0
A 2 01-03-20 0 A 2 01-03-20 3
A 2 01-04-20 0 A 2 01-04-20 4
A 2 01-05-20 0 A 2 01-05-20 0
A 2 01-06-20 0 A 2 01-06-20 0
A 2 01-07-20 0 A 2 01-07-20 0
A 2 01-08-20 0 A 2 01-08-20 0
A 2 01-09-20 0 A 2 01-09-20 0
A 2 01-10-20 0 A 2 01-10-20 0
A 2 01-11-20 0 A 2 01-11-20 0
A 2 01-12-20 0 A 2 01-12-20 0
B 1 01-01-20 0 B 1 01-01-20 6
B 1 01-02-20 0 B 1 01-02-20 2
B 1 01-03-20 0 B 1 01-03-20 3
B 1 01-04-20 0 B 1 01-04-20 0
B 1 01-05-20 0 B 1 01-05-20 0
B 1 01-06-20 0 B 1 01-06-20 0
B 1 01-07-20 0 B 1 01-07-20 0
B 1 01-08-20 0 B 1 01-08-20 0
B 1 01-09-20 0 B 1 01-09-20 0
B 1 01-10-20 0 B 1 01-10-20 0
B 1 01-11-20 0 B 1 01-11-20 0
B 1 01-12-20 0 B 1 01-12-20 0
B 6 01-01-20 0 B 6 01-01-20 0
B 6 01-02-20 0 B 6 01-02-20 8
B 6 01-03-20 0 B 6 01-03-20 5
B 6 01-04-20 0 B 6 01-04-20 3
B 6 01-05-20 0 B 6 01-05-20 7
B 6 01-06-20 0 B 6 01-06-20 4
B 6 01-07-20 0 B 6 01-07-20 0
B 6 01-08-20 0 B 6 01-08-20 0
B 6 01-09-20 0 B 6 01-09-20 0
B 6 01-10-20 0 B 6 01-10-20 0
B 6 01-11-20 0 B 6 01-11-20 0
B 6 01-12-20 0 B 6 01-12-20 0
Is there any way to accomplish this or a similar outcome, so that a record for each combination exists ? Also PowerBI is an option (DAX).
thanks