Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to split column till delimiter using DAX

Hi All,

 

I have column let say Name it is having values like brian lara now i want to create a new column using DAX that have only first name like "brian" .

How to do it using Dax?

 

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Thanks Jimmy.

    Can you please recheck the DAX column formula which you have sent to me. 

    It is not working for me.

    I have tried Following one and it worked fine :

    First name = LEFT(SUBSTITUTE(Players[Name]," ","-"),SEARCH("-",SUBSTITUTE(Players[Name]," ","-"))-1)
     
     
    Cheers,
    Deepak Baberwal

7 Replies

  • Jimmy801's avatar
    Jimmy801
    Community Champion

    Hello

    try to use this Syntax

    left(<your text>;find(" ";<your text>)-1)

    have fun

    Jimmy

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Jimmy.

      Can you please recheck the DAX column formula which you have sent to me. 

      It is not working for me.

      I have tried Following one and it worked fine :

      First name = LEFT(SUBSTITUTE(Players[Name]," ","-"),SEARCH("-",SUBSTITUTE(Players[Name]," ","-"))-1)
       
       
      Cheers,
      Deepak Baberwal
      • Jimmy801's avatar
        Jimmy801
        Community Champion

        Hey

        my solution works just fine

         

        Jimmy