Forum Discussion
maibacherstr
Helper III
4 years agoReformat Month Number (where January = 1) to Text Format Returning "01" instead of "1"
Hello Community, I'm comfortable in Power Query and DAX, but am returning errors when trying to convert month number to a text format while applying IF or SWITCH comparisons and adding a transformati...
- 4 years ago
maibacherstr Try:
Column = VAR __MonthNumberText = MONTH([Date]) & "" VAR __Length = LEN(__MonthNumberText) RETURN IF(__Length = 1, "0" & __MonthNumberText,__MonthNumberText)
Greg_Deckler
Community Champion
4 years agomaibacherstr Try:
Column =
VAR __MonthNumberText = MONTH([Date]) & ""
VAR __Length = LEN(__MonthNumberText)
RETURN
IF(__Length = 1, "0" & __MonthNumberText,__MonthNumberText)