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

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

Reply
Mahamood0218
Helper II
Helper II

Split the columns and apply the sort

Hi Experts ,

i have a two columns(Sub_group_id and Sub_group)

Mahamood0218_0-1652264495571.png

i need to split the Sub_Group data Full-Time/Expert as "Full-Time" and Part-Time/Exempt as "Part-Time" and i have three clomuns data like Contractor ,Project only,Vendar Maintainance i need to show this three data as 

 

Contractor  --- Agency and Contractor

Project only  -- Agency and Contractor

Vendar Maintainance -- Agency and Contractor and finally i need apply sort

finally my output  like as below pic.,

 

Mahamood0218_1-1652265471388.png

 

 

 

 

 

8 REPLIES 8
Anonymous
Not applicable

Hi @Mahamood0218 ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

@Anonymous i get the below issue when i work on pbi

Mahamood0218_0-1654755654475.png

 

Mahamood0218
Helper II
Helper II

@SanketBhagwat as per my requirement your suggestion is working but here main issue is when split the columns in trasformation editor and when close&save i am getting this below issue

Mahamood0218_0-1652717812917.png

 

Vijay_A_Verma
Super User
Super User

In a custom column named SubGroupDisplay, put following formula (Replace Data will your column name)

 

= [s=Text.Replace(Text.Trim(Text.BeforeDelimiter([Data],"/")),"-"," "),
r=if s<>"Full Time" and s<>"Part Time" then "Agency and Contractors" else s][r]

 

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test (later on when you use the query on your dataset, you will have to change the source appropriately. If you have columns other than these, then delete Changed type step and do a Changed type for complete table from UI again)

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcivNydENycxN1ffLz9N1rUjNLShRitWJVnLOzyspSkwuyS8Cc0HqFEDqFPQVXHzAQgGJRSVgragKIHJF+VmpySUK/nk5lWCBsNS8lPwiBd/EzLyS1LzEvGSgulgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Data = _t]),
    #"Added Custom" = Table.AddColumn(Source, "SubGroupDisplay", each [s=Text.Replace(Text.Trim(Text.BeforeDelimiter([Data],"/")),"-"," "),
r=if s<>"Full Time" and s<>"Part Time" then "Agency and Contractors" else s][r])
in
    #"Added Custom"

 

Mahamood0218
Helper II
Helper II

@SanketBhagwat i applied delimiter at column sub group and i get the exact data but when i close and save in Transform edit i am getting issue like below

 

Mahamood0218_0-1652267859077.png

 

Can you share the output you are getting after splitting the column?

SanketBhagwat
Solution Sage
Solution Sage

Hi @Mahamood0218 .
You can split columns using delimeter, in delimeter you can specify as "/".

Refer the below link for more info.
https://docs.microsoft.com/en-us/power-query/split-columns-delimiter


Thanks,
Sanket


If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors