Forum Discussion

LyonsBI_BRL's avatar
LyonsBI_BRL
Helper III
4 years ago
Solved

PowerQuery - Registration Year using M

I'm looking to figure this out on how to set it so if the registrations dates are between May 3rd, 2021 and May 3rd, 2022 its FY22. Anything after May 4th, 2022 and beyond is FY23   Table.AddColum...
  • Vijay_A_Verma's avatar
    4 years ago

    Use this

    = Table.AddColumn(#"Changed Type", "Registration Year", each if Date.From([FirstNewDate])>=#date(2021,5,3) and Date.From([FirstNewDate])<=#date(2022,5,3) then "FY22" else "FY23")