Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Month name to Month Numbers

Hi Team,

 

I have month names in m data I want to get month numbers.

I dont have date column.

MonthRequired Results
Jan01
Feb02
Mar03
Apr04
May05
Jun06
July07
Aug08
Sep09

 

 

Thanks !

 

  • Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

    Required result CC =
    MONTH ( CONVERT ( "2022-" & Data[Month] & "-01", DATETIME ) )
    

2 Replies

  • Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

    Required result CC =
    MONTH ( CONVERT ( "2022-" & Data[Month] & "-01", DATETIME ) )
    
    • Riv's avatar
      Riv
      Icon for Advocate I rankAdvocate I

      I tried this and I got this error: "Cannot convert value 'May' of type Text to type Date."