Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Separate String and Numbers in the same column but diff rows

Just started learning Power BI

 

I have a column where the values got mixed in with the name instead of just SKU numbers. How do I separate the value of this column to 2 new ones . So basically the numerics and the strings(alphabet) will be in a new column same row

Current Table 

KeyProduct SKU
Mom8723927
Dad7483649

Daughter

Jane Doe

SonJohn Doe
Cousin23749

 

 

Expected results

KeyProduct SKU revisedName
Mom8723927 
Dad7483649 
Daughter Jane Doe
Son John Doe
Cousin23749 

 

 

  • Anonymous you can add two new columns as per below DAX Expression:

     

    Product SKU Revised = IFERROR(VALUE( 'Table'[Product SKU] ),BLANK())
    
    Name = IF( ISERROR(VALUE('Table'[Product SKU])), 'Table'[Product SKU] )

     

4 Replies

  • Anonymous you can add two new columns as per below DAX Expression:

     

    Product SKU Revised = IFERROR(VALUE( 'Table'[Product SKU] ),BLANK())
    
    Name = IF( ISERROR(VALUE('Table'[Product SKU])), 'Table'[Product SKU] )

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Where/How do you apply this DAX expression?

      I am not in that topic yet

      • v-joesh-msft's avatar
        v-joesh-msft
        Solution Sage

        Hi Anonymous ,

        As parry2k said, select -Modeling-New Column in the Data view and enter the formula:

        Best Regards,

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