Forum Discussion

PaulTHR's avatar
PaulTHR
Frequent Visitor
3 years ago
Solved

Create date format to show this month last month etc

Hi - is it possible in Powerquery to create a column alongside a date column that does the following... Today is 17th May - make record state "This Month" Previous date say 15th April would need ...
  • PaulTHR's avatar
    PaulTHR
    3 years ago

    I have managed to create a flag for "This Month" but need to add a "Last Month" & "Previous Month" & "Previous Month +!" etc etc - just 6 times anything out of date range I can 'Else' out

    if Date.StartOfMonth([date]) = Date.StartOfMonth(DateTime.Date(DateTime.LocalNow())) then "This Month" else "Not this month"