Forum Discussion

VivG's avatar
VivG
Frequent Visitor
6 years ago
Solved

Dates between merge join / Expand columns performance issue

Hi all,   I have a first very simple table A which contains only three columns: - a unique ID - a client ID - a date This table has 30,000 rows.   I have a second table B with these important...
  • edhans's avatar
    6 years ago

    This is your problem:

    #"Date range selection" = Table.AddColumn(#"Merge", "custom", each let mydate= [date] in Table.SelectRows([new_column],each [start date] <= mydate and [end date] >= mydate))

     It is going to get deep into the weeds, but ImkeF article here I think will help you.

  • VivG's avatar
    VivG
    6 years ago

    Yes I read the article you linked and I tried to apply this to my situation but I was quite confused on which grouping dimension I should use on my different tables, I really have to improve my understanding of the M language...

    Somebody suggested me to just invert step 2 and step 3 (so to do the expand column before doing the row selection) and it immediately solved my problem as table B is now loading only one time.

    Thank you for your help edhans and for the link!