Forum Discussion
gonrodrigues
10 years agoHelper III
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...
- 10 years ago
- 10 years ago
You can get the HomologousMonth with Date.IsInCurrentMonth as well. Just 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.
Greg_Deckler
10 years agoCommunity Champion
Can you explain what you want PreviousMonth to be? Do you want the actual previous month or do you want it to be a TRUE/FALSE value like CurrentMonth. And I have no idea what you are going for with HomologousMonth, is that the same as the current month in a different year? And is that also TRUE/FALSE or something else?
gonrodrigues
10 years agoHelper III
Hey Greg_Deckler
I want both TRUE/FALSE. HomologousMonth would be the same month in previous year :)
Thanks