Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Yqy
Helper I
Helper I

split column by delimiter in dax

i need to split this column by the left most delimiter "/", how can i do this. 

I have the follwing code but it didn,t work for me

= LEFT('Data'[Column 1], FIND("/", 'Data'[Column 1])-1)
 
ABC/DDD/AAA/CCC ABCDDD/AAA/CCC
1 ACCEPTED SOLUTION
ichavarria
Solution Specialist
Solution Specialist

Hi @Yqy,

 

The formula you provided seems to be correct, but you may need to adjust it if the data in your column does not always have the same number of delimiter characters ("/").

Here's the modified formula that you can try:

= LEFT('Data'[Column 1], FIND("/", 'Data'[Column 1] & "/")-1)

The difference is that we added a "/" character at the end of the column data in the FIND function. This is to ensure that the formula always finds a delimiter character, even if the original data does not end with one.

 

Alternatively, you can use the Text.Split function to split the column data by the delimiter and extract the first element of the resulting list. Here's the formula for that:

 

= Text.Split('Data'[Column 1], "/"){0}

 

This formula splits the column data into a list using the delimiter "/", and then extracts the first element of the list (which corresponds to the text before the first delimiter).

 

 

Best regards, 

Isaac Chavarria

If this post helps, then please consider Accepting it as the solution and give Kudos to help the other members find it more quickly

View solution in original post

1 REPLY 1
ichavarria
Solution Specialist
Solution Specialist

Hi @Yqy,

 

The formula you provided seems to be correct, but you may need to adjust it if the data in your column does not always have the same number of delimiter characters ("/").

Here's the modified formula that you can try:

= LEFT('Data'[Column 1], FIND("/", 'Data'[Column 1] & "/")-1)

The difference is that we added a "/" character at the end of the column data in the FIND function. This is to ensure that the formula always finds a delimiter character, even if the original data does not end with one.

 

Alternatively, you can use the Text.Split function to split the column data by the delimiter and extract the first element of the resulting list. Here's the formula for that:

 

= Text.Split('Data'[Column 1], "/"){0}

 

This formula splits the column data into a list using the delimiter "/", and then extracts the first element of the list (which corresponds to the text before the first delimiter).

 

 

Best regards, 

Isaac Chavarria

If this post helps, then please consider Accepting it as the solution and give Kudos to help the other members find it more quickly

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.