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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
IanDavies
Helper III
Helper III

Replacing text

I have some exported data that is imported to PowerQuery as a TAB separated file and one of the columns has the data in this format:

 

{'Group_tags': ['GMGB'], 'Host_tags': []}

 

I'd like to be able to extract just the TAG (GMGB) without any of the surrounding key names or punctuation. A simple text replace doesn't work, I assume because there are special or control characters in the text.

There is only ever one TAG and always in Group_tags

 

Is there a way to get to the desired output?

Ian

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@IanDavies So you want the GMGB? You could use split column potentially. You could also use RegEx expressions in an R or Python script step.



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

4 REPLIES 4
IanDavies
Helper III
Helper III

Split Column worked for my purposes. I did two splits, the first one on one position and the second one on the lefy most occurence of a delimiter.

 

It feels like a fudge but gives me what I need.

UPDATE:

 

I was able to do this by splitting on the apostrophes and removing all unwanted columns

Greg_Deckler
Community Champion
Community Champion

@IanDavies So you want the GMGB? You could use split column potentially. You could also use RegEx expressions in an R or Python script step.



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...

AFAIK I cant use DAX. The recipients of the final output will only have Excel hence the question in a Power Query forum.

 

Not familiar with R ... could do python but not sure I want to (REGEX yuck). I will research how to do this. If you've got pointers to get me started I'd appreciate it.

 

I'll try the split column route and see what happens

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors