Forum Discussion

Rookarumba's avatar
Rookarumba
Icon for Helper III rankHelper III
8 years ago
Solved

M Language : How to write M to match date that is in-between two dates

Hi Everyone,   I need some advice or help to write a M syntax that matches a date that fall within a date range in another table.   E.g.   Table 1 ID | Production Date 1  | 2015   Table 2 ...
  • v-yulgu-msft's avatar
    8 years ago

    Hi Rookarumba,

     

    You could first merge two tables with Full Outer Join, then, filter rows based on specific condition.

     

    Add below filter code in Advanced editor.

     #"Filtered Rows" = Table.SelectRows(#"Expanded Table2", each [Production Date] >= [Table2.Production Start] and [Production Date] <= [Table2.Production End])

     

    Best regards,

    Yuliana Gu