Forum Discussion

M_SBS_6's avatar
M_SBS_6
Icon for Helper V rankHelper V
2 years ago
Solved

M dates

Hi,  How I do in power query write out previous year to date?    I have a Year to date flag using date.isinyeartodate(app_date). I just want the same thing but for last year. Any ideas please? 
  • Ahmedx's avatar
    2 years ago

    pls try this

    Date.IsInCurrentYear(
        Date.AddYears(  [app_date],1)
         ) = true and  [app_date] <=  Date.AddYears(Date.From( DateTime.LocalNow()),-1)