Forum Discussion

Userpath77's avatar
Userpath77
Helper II
4 years ago
Solved

M-Code for Dynamic Date

Hello All   I need to modify this M-Code so that it is only keeping data for the last 5 years beginning on or after 1 Oct of that 5th year. As an example, right now in 2021 I would want data all th...
  • mahoneypat's avatar
    4 years ago

    Please try using this filter step instead

     

    Table.SelectRows(#"Changed Type", each [Date Arrived Personnel Office] >= #date(Date.Year(DateTime.LocalNow())-5, 10, 1))

     

    Pat