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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ABech
Frequent Visitor

Split string after every n'th character multiple times

Hello experts

 

After many hours i finally succeded with some Power Automate flows which exports my firms Planner tasks, so i can use that export as a source for Power BI.

 

I just have 1 problem left.... 

In my export multiple employees can be assigned the same task, hence my export looks something like this:

 

Task 1TimTomJoe
Task 2Eli
Task 3TomEli

 

The Assigned names are combined in 1 cell with no delimiters. 

 

Fortunately im not exporting their names but their initials (i just used names in the example for simplification), so all names/initials consists of only 3 letters.

 

My question is now. How do i split this up? 

 

What i want is just being able to show who have been assigned the different task, and in another visual how many tasks the individual employees have been assigned. 

 

Therefore I think so far, that I probably have to duplicate every task ID for every employee name, but im open for other ideas.

 

EDIT: Just to clarify. The tasks are in one column and names in another. When i hit the post button my table looks only 1 column.

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@ABech Try this:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkkszlYwVNJRCsnMDcnP9cpPVYrVgQobAYVdczIRAsYgdfm5YLFYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}}),
    #"Split Column by Position" = Table.SplitColumn(#"Changed Type", "Column2", Splitter.SplitTextByRepeatedLengths(3), {"Column2.1", "Column2.2", "Column2.3"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Position",{{"Column2.1", type text}, {"Column2.2", type text}, {"Column2.3", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"Column1"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
in
    #"Removed Columns"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@ABech Try this:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkkszlYwVNJRCsnMDcnP9cpPVYrVgQobAYVdczIRAsYgdfm5YLFYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}}),
    #"Split Column by Position" = Table.SplitColumn(#"Changed Type", "Column2", Splitter.SplitTextByRepeatedLengths(3), {"Column2.1", "Column2.2", "Column2.3"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Position",{{"Column2.1", type text}, {"Column2.2", type text}, {"Column2.3", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"Column1"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
in
    #"Removed Columns"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hello @Greg_Deckler 

And thank you for your help once more.

 

I'm quite a newbie at Power BI, and do not have much experience with DAX or transforming data.

 

Can you tell me where I should insert this code? 

@ABech Use the Transform data button on the Home tab to get to Power Query Editor. Create a new Blank query. Open Advanced Editor, replace the entire contents with the code provided. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.