Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Advanced(?) Merge Based on Latest Date after another Field Date

I need to join some data (in a method I don't entirely agree with but I don't see any other option based on my dataset) and although I have a solution it takes an age to load due to 'many to many' re...
  • wdx223_Daniel's avatar
    3 years ago

    let
    Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],

    JobGroup=Table.Buffer(Table.Group(Job,"Prod",{"n",each List.Sort([JobDate],1)})),

    Custom1=Table.AddColumn(Source,"JobDate",each List.Skip(JobGroup{[Prod=[Item]]}?[n]? ??{},(x)=>x>[InvoiceDate]){0}?)

    in Custom1