Forum Discussion

Poornima2023's avatar
Poornima2023
Icon for Helper I rankHelper I
2 years ago
Solved

Seperate words in direct Query

Hi,

 

In power bi i have direct query. I have one column where i need to seperate words in different column.

NAME/AGE/Class

 

So I want all to per seperated where "/" is found. Not able to use delimiter as its a direct query

 

Please help 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  Poornima2023 ,
    I’d like to acknowledge the valuable input provided by the amitchandak  . Their initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue. 
    In my investigation, I took the following steps:


    Create three columns

    Name = LEFT([Column], FIND("/", [Column]) - 1)
    Age = MID([Column], FIND("/", [Column]) + 1, FIND("/", [Column], FIND("/", [Column]) + 1) - FIND("/", [Column]) - 1)
    Class = RIGHT([Column],FIND("/",[Column])-1)

    Final output

     

    Best regards,

    Albert He

     

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

     



     

2 Replies

  • Poornima2023 , I doubt you will be able to create a complex column using Power query.

     

    You can try with DAX Search and Right, left, and Mid. But I doubt everything is supported

     

    example

    Name  =  Left([Column], search("/", [Column],,1) )

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Poornima2023 ,
    I’d like to acknowledge the valuable input provided by the amitchandak  . Their initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue. 
    In my investigation, I took the following steps:


    Create three columns

    Name = LEFT([Column], FIND("/", [Column]) - 1)
    Age = MID([Column], FIND("/", [Column]) + 1, FIND("/", [Column], FIND("/", [Column]) + 1) - FIND("/", [Column]) - 1)
    Class = RIGHT([Column],FIND("/",[Column])-1)

    Final output

     

    Best regards,

    Albert He

     

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