Forum Discussion

gonrodrigues's avatar
gonrodrigues
Helper III
10 years ago
Solved

Custom Column Homologous Month

Hello,   To create colum Current Month I used this:   Table.AddColumn(MonthName, "CurrentMonth", each Date.IsInCurrentMonth( [Date] )) and if I want to creat two more: "HomologousMonth" and "Pre...
  • Eric_Zhang's avatar
    Eric_Zhang
    10 years ago

    gonrodrigues

     

    They're DAX expressions, I was not using Power Query. Is Power Query necessary?

  • Eric_Zhang's avatar
    Eric_Zhang
    10 years ago

    gonrodrigues

     

    You can get the HomologousMonth with Date.IsInCurrentMonth as wellJust add one year to [Date] and predicate it with IsInCurrentMonth.

    Table.AddColumn(PreviousMonth, "HomologousMonth", each Date.IsInCurrentMonth( Date.AddYears([Date],1) ))



    If you have any question, feel free to let me know.