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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
nomi
Regular Visitor

DAX formula help splitting string using delimiters

My sample column contains strings with multiple delimiters. For example:

Sample Column
abc/defg/klmno
abc/defg
abc

 

Only using the delimiter "/", I want to split it into 3 separate columns that are named: Column 1, column 2, and column 3. So the result should look like this:

Sample ColumnColumn 1Column 2Column 3
abc/defg/klmnoabcdefgklmno
abc/defgabcdefg 
abcabc  

 

I can't use number of characters because these change from row to row. Can anyone please help me how to write this in DAX? I can't use power query in this instance.

1 ACCEPTED SOLUTION

Hi,

thank you for your feedback.

I added one by one into the orginal table -> please check the attached pbix file.

 

Jihwan_Kim_0-1668587064298.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I suggest doing this in Power Query Editor.

In case power query editor is not accessible, please try the below in order to create a new table.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1668580498072.png

 

 

New Table = 
SUMMARIZE (
    ADDCOLUMNS (
        ADDCOLUMNS ( 'Table', "@Path", SUBSTITUTE ( 'Table'[Sample Column], "/", "|" ) ),
        "@column1", PATHITEM ( [@Path], 1 ),
        "@column2", PATHITEM ( [@Path], 2 ),
        "@column3", PATHITEM ( [@Path], 3 )
    ),
    'Table'[Sample Column],
    [@column1],
    [@column2],
    [@column3]
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

I think it is too complicated for me to create a new table, as I am not sure how it affects future capability to refresh or update the underlying dataset.

 

Is there any way to individually create these columns from the original table, by adding new columns?

 

I tried exploring option to count the number of characters in reference to the / delimiter, etc but kind of got even more confused than before...

Hi,

thank you for your feedback.

I added one by one into the orginal table -> please check the attached pbix file.

 

Jihwan_Kim_0-1668587064298.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.