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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sara11
Helper I
Helper I

Change the order of text in a column

I have a column with text like this:

Kristof, I., Apud, G.R., Aredes-Fernández, P.
or
Wacker, M., Keiser, J., Hirt, B., Stahl, M., Scharfenberger-Schmeer, M., Durner, D.
or
Yem, O., Petrie, P.R.

 

and I'd like to change this text to

I. Kristof, G. R. Apud, P. Aredes-Fernández
M. Wacker, J. Keiser, B. Hirt, M. Stahl, M. Scharfenberger-Schmeer, D. Durner

O. Yem, P. R. Petrie

i.e. the first names appear first, followed by the surname. The authors' names are separated by ",".

 

Thank you.

1 ACCEPTED SOLUTION
slorin
Super User
Super User

Hi, @sara11 

 

Text.Combine(
List.Transform(
List.Split(Text.Split([Your_Column],", "),2),
each Text.Combine(List.Reverse(_)," ")),
", ")

Stéphane

View solution in original post

2 REPLIES 2
slorin
Super User
Super User

Hi, @sara11 

 

Text.Combine(
List.Transform(
List.Split(Text.Split([Your_Column],", "),2),
each Text.Combine(List.Reverse(_)," ")),
", ")

Stéphane

Thank you! It worked!

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Kudoed Authors