Forum Discussion

maibacherstr's avatar
maibacherstr
Icon for Helper III rankHelper III
4 years ago
Solved

Reformat 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...
  • Greg_Deckler's avatar
    4 years ago

    maibacherstr Try:

    Column = 
        VAR __MonthNumberText = MONTH([Date]) & ""
        VAR __Length = LEN(__MonthNumberText)
    RETURN
        IF(__Length = 1, "0" & __MonthNumberText,__MonthNumberText)