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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
DataP
New Member

Split a calculated column

Hello, 

I am trying to split a calculated column but I haven't been able to find how. I was planning to use the "split column" option built on PowerBi but once I went to "Transform data" my calculated column does not show up, so I can't use the "split column" option. Does anybody know how I can split the data in a calculated column? This is an example of what I would like to get: 

 

Calculcated columnSplit column 1Split column 2Split column 3
1-2-3123
2-3-4234
4-5-6456

 

 

Thank you!

 

 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@DataP 

or (and thats much better):

Split column 1 = PATHITEM(SUBSTITUTE([Calculcated column], "-", "|"), 1)
Split column 2 = PATHITEM(SUBSTITUTE([Calculcated column], "-", "|"), 2)
Split column 3 = PATHITEM(SUBSTITUTE([Calculcated column], "-", "|"), 3)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

6 REPLIES 6
az38
Community Champion
Community Champion

Hi @DataP 

try new calculated columns

Split column 1 = LEFT([Calculcated column], SEARCH("-", [Calculcated column]) - 1 )
Split column 2 = MID([Calculcated column], LEN([Split column 1]) + 2, LEN([Calculcated column]) - SEARCH("-", [Calculcated column], LEN([Split column 1]) + 2 ) )
Split column 3 = RIGHT([Calculcated column], LEN([Calculcated column]) - LEN([Split column 1]) - LEN([Split column 2]) -2)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
mjc543
Advocate II
Advocate II

Single-click the heading of the column you'd like to split, then click the drop-down labeled 'Split Column' in the 'Transform' group on the 'Home' tab.Annotation 2020-06-16 153057.png

Hi mjc543, 

Thank you for your answer, I tried that but the issue I have is that my calculated column does not apppear in the query editor or "transform data". I believe the column on your screenshot is not a calculated column. 

This is why I can't find a way to split my column.

 

 

Oh ok I misunderstood, my fault. Question: if it is in fact a "calculated" column - it must have been calculated from something, no? So logically the individual components already exist somewhere? Perhaps they got removed as an applied step in Power Query? If so, delete that step and they will be restored and there will be no need to split.

az38
Community Champion
Community Champion

@DataP 

or (and thats much better):

Split column 1 = PATHITEM(SUBSTITUTE([Calculcated column], "-", "|"), 1)
Split column 2 = PATHITEM(SUBSTITUTE([Calculcated column], "-", "|"), 2)
Split column 3 = PATHITEM(SUBSTITUTE([Calculcated column], "-", "|"), 3)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 

This is a beautiful solution and worked great for me. Thank you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.