Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I was wondering if there was a simple way to swap text values in a column based on a comma delimiter as I would like the split the column to a 'City' column?
Example:
My column named 'Country' has text values of
Sydney, Australia
I want to change these values to:
Australia, Sydney
Any assistance greatly appreciated!
Solved! Go to Solution.
I think I found another way around it using Extract text
= Table.TransformColumns(#"Added Custom", {{"Country", each Text.BeforeDelimiter(_, ","), type text}})
Good day fred65,
I'm glad you found a solution for yourself. Here is an alternative.
The code is as follows. Replace "Source" with the name of your previous step.
= Table.TransformColumns(
Source,
{
{"Country", each Text.Combine(List.Reverse(Text.Split(_, ", ")), ", ")}
}
)
Hope this helps.
Good day fred65,
I'm glad you found a solution for yourself. Here is an alternative.
The code is as follows. Replace "Source" with the name of your previous step.
= Table.TransformColumns(
Source,
{
{"Country", each Text.Combine(List.Reverse(Text.Split(_, ", ")), ", ")}
}
)
Hope this helps.
I think I found another way around it using Extract text
= Table.TransformColumns(#"Added Custom", {{"Country", each Text.BeforeDelimiter(_, ","), type text}})
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 14 | |
| 14 | |
| 10 | |
| 8 | |
| 8 |