Spreadsheet: 877000d1723701219-powerquery-fill-in-table-for-missing-workdays-allisterb-fiinin-365-aligw
Sheet: Sheet1

 |  |  |  |  |  |  | Source File |  |  |  |  | Desired Output |  |  |  |  | The Output
 |  |  |  |  |  |  |  |  |  |  |  |  |  | Workdays only Monday-Friday |  |  | The Outout Table has a row for each Combination of Code and Type  for every  possible workday between the earliest date and the latest  date in the source table
 |  |  |  |  |  |  | Code | Type | Date | Value |  | Code | Type | Date | Value |  | If there is no value for the combination of Code and Type  then it takes on the most recent value for the Combination of Code and Type |  |  |  |  |  | Type | Date | Value
 |  |  |  |  |  |  | AKL | A | 2024-11-12 00:00:00 | 1 |  | WAI | C | 2024-11-12 00:00:00 | 12 |  |  |  |  |  |  | AKL | A | 2024-11-12 00:00:00 | 1
 |  |  |  |  |  |  | AKL | B | 2024-11-12 00:00:00 | 2 |  | WAI | B | 2024-11-12 00:00:00 | 15 |  |  |  |  |  |  | AKL | B | 2024-11-12 00:00:00 | 2
 |  |  |  |  |  |  | AKL | C | 2024-11-12 00:00:00 | 3 |  | WAI | A | 2024-11-12 00:00:00 | 17 |  | These values are taken from eth most recent instance of Type and Code |  |  |  |  | AKL | C | 2024-11-12 00:00:00 | 3
 |  |  |  |  |  |  | AKL | A | 2024-11-14 00:00:00 | 10 |  | AKL | A | 2024-11-12 00:00:00 | 1 |  |  |  |  |  |  | WAI | A | 2024-11-12 00:00:00 | 12
 |  |  |  |  |  |  | AKL | B | 2024-11-14 00:00:00 | 20 |  | AKL | B | 2024-11-12 00:00:00 | 2 |  |  |  |  |  |  | WAI | B | 2024-11-12 00:00:00 | 15
 |  |  |  |  |  |  | AKL | C | 2024-11-14 00:00:00 | 30 |  | AKL | C | 2024-11-12 00:00:00 | 3 |  |  |  |  |  |  | WAI | C | 2024-11-12 00:00:00 | 17
 |  |  |  |  |  |  | AKL | A | 2024-11-15 00:00:00 | 10 |  | AKL | A | 2024-11-13 00:00:00 | 1 |  |  |  |  |  |  | AKL | A | 2024-11-13 00:00:00 | 1
 |  |  |  |  |  |  | AKL | B | 2024-11-15 00:00:00 | 20 |  | AKL | B | 2024-11-13 00:00:00 | 2 |  |  |  |  |  |  | AKL | B | 2024-11-13 00:00:00 | 2
 |  |  |  |  |  |  | AKL | C | 2024-11-15 00:00:00 | 30 |  | AKL | C | 2024-11-13 00:00:00 | 3 |  |  |  |  |  |  | AKL | C | 2024-11-13 00:00:00 | 3
 |  |  |  |  |  |  | AKL | A | 2024-11-16 00:00:00 | 10 |  | WAI | A | 2024-11-13 00:00:00 | 12 |  |  |  |  |  |  | WAI | A | 2024-11-13 00:00:00 | 12
 |  |  |  |  |  |  | AKL | B | 2024-11-16 00:00:00 | 20 |  | WAI | B | 2024-11-13 00:00:00 | 15 |  |  |  |  |  |  | WAI | B | 2024-11-13 00:00:00 | 15
 |  |  |  |  |  |  | AKL | C | 2024-11-16 00:00:00 | 30 |  | WAI | C | 2024-11-13 00:00:00 | 17 |  |  |  |  |  |  | WAI | C | 2024-11-13 00:00:00 | 17
 |  |  |  |  |  |  | AKL | A | 2024-11-17 00:00:00 | 5 |  | WAI | C | 2024-11-14 00:00:00 | 3 |  |  |  |  |  |  | AKL | A | 2024-11-14 00:00:00 | 10
 |  |  |  |  |  |  | AKL | B | 2024-11-17 00:00:00 | 15 |  | WAI | B | 2024-11-14 00:00:00 | 4 |  |  |  |  |  |  | AKL | B | 2024-11-14 00:00:00 | 20
 |  |  |  |  |  |  | AKL | C | 2024-11-17 00:00:00 | 45 |  | WAI | A | 2024-11-14 00:00:00 | 5 |  |  |  |  |  |  | AKL | C | 2024-11-14 00:00:00 | 30
 |  |  |  |  |  |  | WAI | A | 2024-11-12 00:00:00 | 12 |  | AKL | C | 2024-11-14 00:00:00 | 30 |  |  |  |  |  |  | WAI | A | 2024-11-14 00:00:00 | 3
 |  |  |  |  |  |  | WAI | B | 2024-11-12 00:00:00 | 15 |  | AKL | B | 2024-11-14 00:00:00 | 20 |  |  |  |  |  |  | WAI | B | 2024-11-14 00:00:00 | 4
 |  |  |  |  |  |  | WAI | C | 2024-11-12 00:00:00 | 17 |  | AKL | A | 2024-11-14 00:00:00 | 10 |  |  |  |  |  |  | WAI | C | 2024-11-14 00:00:00 | 5
 |  |  |  |  |  |  | WAI | A | 2024-11-14 00:00:00 | 3 |  | AKL | C | 2024-11-15 00:00:00 | 30 |  |  |  |  |  |  | AKL | A | 2024-11-15 00:00:00 | 10
 |  |  |  |  |  |  | WAI | B | 2024-11-14 00:00:00 | 4 |  | AKL | B | 2024-11-15 00:00:00 | 20 |  |  |  |  |  |  | AKL | B | 2024-11-15 00:00:00 | 20
 |  |  |  |  |  |  | WAI | C | 2024-11-14 00:00:00 | 5 |  | AKL | A | 2024-11-15 00:00:00 | 10 |  |  |  |  |  |  | AKL | C | 2024-11-15 00:00:00 | 30
 |  |  |  |  |  |  | WAI | A | 2024-11-17 00:00:00 | 10 |  | WAI | A | 2024-11-15 00:00:00 | 3 |  |  |  |  |  |  | WAI | A | 2024-11-15 00:00:00 | 3
 |  |  |  |  |  |  | WAI | B | 2024-11-17 00:00:00 | 20 |  | WAI | B | 2024-11-15 00:00:00 | 4 |  |  |  |  |  |  | WAI | B | 2024-11-15 00:00:00 | 4
 |  |  |  |  |  |  | WAI | C | 2024-11-17 00:00:00 | 30 |  | WAI | C | 2024-11-15 00:00:00 | 5 |  |  |  |  |  |  | WAI | C | 2024-11-15 00:00:00 | 5
 |  |  |  |  |  |  | Total |  |  |  |  | Total |  |  |  |  |  |  |  |  |  | Total |  |  | 244