Forum Discussion

unnijoy's avatar
unnijoy
Icon for Post Prodigy rankPost Prodigy
5 years ago
Solved

Extracting text before a delimiter

I have  a column ( Name & ID) that contain name and employee ID. i need to extract only the name using a dax.   for example the name is Mathew  V James (12345).   Now i need to get the text as Ma...
  • v-kkf-msft's avatar
    v-kkf-msft
    5 years ago

    Hi unnijoy ,

     

    Does your Name & ID column contain data like "AA" without parentheses? If so, you will get an error when using the DAX provided by amitchandak . 

     

     

    Try the following formula:

     

    Name = 
    LEFT(
        'Table'[Name & ID],
        SEARCH(
            "(", 
            'Table'[Name & ID],
            ,
            LEN('Table'[Name & ID]) + 1
        ) - 1
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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