Forum Discussion

abymat's avatar
abymat
Regular Visitor
6 years ago
Solved

Splitting numbers into column

How do we split value such as 2019-01  into two different columns ie 2019 and 01?

  • Hi,

    You can do this by using Power Query Editor option.

    Go to Query Editor - - > select the your date column - - >right click on it - - > select split column by delimiter and enter "-" in delimiter option - - >click OK.

    Please give Kudos to this effort and mark it as a solution if it helps you.



  • Hi abymat ,

     

    As Tahreem24 's suggestion, you can split the original into two columns in Query Editor.

     

    If you need to remain the original column, you can also create columns using DAX below.

     

    Year=MID(Table1[Date],1,4)

    Month=MID(Table1[Date],6,2)

     

    Best Regards,

    Amy

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • Hi,

    You can do this by using Power Query Editor option.

    Go to Query Editor - - > select the your date column - - >right click on it - - > select split column by delimiter and enter "-" in delimiter option - - >click OK.

    Please give Kudos to this effort and mark it as a solution if it helps you.



  • v-xicai's avatar
    v-xicai
    Community Support

    Hi abymat ,

     

    As Tahreem24 's suggestion, you can split the original into two columns in Query Editor.

     

    If you need to remain the original column, you can also create columns using DAX below.

     

    Year=MID(Table1[Date],1,4)

    Month=MID(Table1[Date],6,2)

     

    Best Regards,

    Amy

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.