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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
modi123p
Helper III
Helper III

Replacer.ReplaceText for dot is failing on Data Flows

Hi,

 

I need to replace "." and "/" with a "|" character.

 

PFB snapshot of the Replacer.ReplaceText  usage which was created from UI.

While the step to replace dot works as expected in Power Query on PBI Desktop,  I m seeing that an | is introduced for every character on DataFlows. Please take a look at this issue.

 

PQ.PNG

 

Thanks & Regards,

Mannu

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @modi123p ,

 

I create a dataflow based on your code, and I can get correct result.

 

image.png

Please try again with the following code:

 

let
  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQxMNB3NjTTd/Iw1Tc0s7TQd1TSwSoaqxOtFOqsZ2CoZ2ACJM2BylC4sbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [funct_loc_funct_loc1 = _t, Path = _t]),
  #"Replace Value1" = Table.ReplaceValue(Source, ".", "|", Replacer.ReplaceText, {"Path"}),
  #"Replace Value2" = Table.ReplaceValue(#"Replace Value1", "/", "|", Replacer.ReplaceText, {"Path"})
in
  #"Replace Value2"

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

The code is exactly the same as you mentioned. But as you can see from the snapshot.... "|" is geting introduced after each character when used with  dot.  This, however doesnt happen while replacing "/"  on the same column.

 

I entered directly on DF and it seems to work.

 

let
  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WctRz0nPWc1HSgbNidYCi+k76zvpgUSgLLArkAHlArou+qytIElUAogZojhPQJGewPJwTGwsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable textmeta [Serialized.Text = true]) in type table [Before = _t, After = _t]),
  #"Replaced value" = Table.ReplaceValue(Source, "/""|", Replacer.ReplaceText, {"After"}),
  #"Replaced value 1" = Table.ReplaceValue(#"Replaced value", ".""|", Replacer.ReplaceText, {"After"})
in
  #"Replaced value 1"

 

However, strangely, I m encountering error with data from impala.

It works fine with PBI Desktop though

@v-kkf-msft 

Hi Winniz,

 

Thank you for looking into the issue.

There is no error message.

Parsing is incorrect.

I m not doing any other transformations here.

 

1. Connect to Impala Data Source(Impala)

2. Replace "." character with "|" on column named path

3. Replace "/" with "|" on column named path

 

The steps were generated from UI.

 

While the exact Power Query code works fine on PBI Desktop, I m seeing the strange parsing on PBI Service.

 

Hence thought of reporting it here.

 

Thanks & regards,
Mannu

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors