Forum Discussion
SJHALANI
3 years agoHelper I
Convert numbers to Months
Hello, I have a column where numbers are written from 0 to 11. Now I want to create a column where 0 should be replaced with the current month, for eg, February, and 1 should be replaced by next mon...
- 3 years ago
NewStep=Table.AddColumn(PreviousStepName,"Output wanted",each DateTime.ToText(Date.AddMonths(DateTime.LocalNow(),[Current Column]),"MMMM\'yy","en"))
SJHALANI
3 years agoHelper I
Thank you! You are Awesome. I will mark this as a solution.
However, one last thing - When I build a chart using these Month-Year combination, the axis isn't sorted automatically based on the chrnology of months. Any quick way to do this?
TIA!
wdx223_Daniel
3 years agoCommunity Champion
you need set "SortBy Column" in the table page, and select the [Current Column]