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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
BrandonH
Frequent Visitor

Double Quotation (") - Identification and Removal

Hello All, 

 

I am working with some regulatory language as I talked about in my last post. Link
Having pulled in some new data there is a special character " (double quotes, my assumption) that are not being replaced/cleaned elsewhere in my query.

 

What Power Query is displaying"Why is this happening."
What Microsoft Word is displaying"Why is this happening."
What Notepad is displaying"""Why is this happening."""

 

Using a text replacement for the " character doesnt work, using a text replacement for """ doesnt work. Using webbased character identifiers they finds that the characters are double quotes (U+0022). Using a text replacement for #(0022) doesnt work.

 

Am I missing something glaring here? I'd just edit the source data but it is regularly refreshed (overwritten). Any fixes to the source would be temporary. 

 

1 ACCEPTED SOLUTION
BrandonH
Frequent Visitor

Hi Pat, 

 

I ended up using a few different steps to try to clean the double quotation marks. One thing that I ended up doing was using the text replace function, pointing it to my column and replacing a set of double quotes written as "" with nothing (using the quote structure of M code)  "" so the actual step in my query looks like this: 

 

= Table.ReplaceValue(#"Replaced Value","""","",Replacer.ReplaceText,{"MyColumn"})

 

I guess our takeaway here is to replace a double quote character we need to specify a set of double quotes within the M code so power query understands what we are replacing, like escaping a character in other languages/expressions. 

View solution in original post

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

One thing to try would be to find a cell that has the character and click on it in the query editor. You then see the value in the preview window below where you can select that character, copy it, and paste it into the Replace values pop up.

 

Pat

Microsoft Employee
BrandonH
Frequent Visitor

Hi Pat, 

 

I ended up using a few different steps to try to clean the double quotation marks. One thing that I ended up doing was using the text replace function, pointing it to my column and replacing a set of double quotes written as "" with nothing (using the quote structure of M code)  "" so the actual step in my query looks like this: 

 

= Table.ReplaceValue(#"Replaced Value","""","",Replacer.ReplaceText,{"MyColumn"})

 

I guess our takeaway here is to replace a double quote character we need to specify a set of double quotes within the M code so power query understands what we are replacing, like escaping a character in other languages/expressions. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors
Users online (471)