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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Help - Power Query

Hi all,

 

I am a new using power query and I heve the error scenario when I try to execute a test with dataflow:

 

"Expression.Error: A cyclic reference was found during the evaluation."

 

This is my power query:

let
  Origem = OData.Feed("https://testbr.api.crm2.dynamics.com/api/data/v9.1/"null, [Implementation = "2.0"]),
  Navigation = Origem{[Name = "accounts", Signature = "table"]}[Data],
  #"Escolher colunas" = Table.SelectColumns(Navigation, {"accountnumber"}),
  #"Linhas filtradas" = Table.SelectRows(#"Escolher colunas", each [accountnumber] <> null and [accountnumber] <> ""),
  #"Linhas filtradas 1" = Table.SelectRows(#"Linhas filtradas", each Text.Contains([accountnumber], ".") or Text.Contains([accountnumber], "/") or Text.Contains([accountnumber], "-"))
  = Table.ReplaceValue(accounts,".","",Replacer.ReplaceText,{accountnumber}) or Table.ReplaceValue(accounts,"/","",Replacer.ReplaceText,{accountnumber})
or Table.ReplaceValue(accounts,"-","",Replacer.ReplaceText,{accountnumber})
in
  #"Linhas filtradas 1"

 

I am trying to take the special characters of a text (example: "24.462.349/0001-03" to "24462349000103"). But always receive the same error.

 

Thanks in advance!

Rafael Santos

 

 

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

FYI that a quick way to strip the numbers out of a text column is to add a custom column with the Text.Select() function.

 

= Text.Select([Column1], {"0".."9"})

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


lbendlin
Super User
Super User

This part

 

 #"Linhas filtradas 1" = Table.SelectRows(#"Linhas filtradas", each Text.Contains([accountnumber], ".") or Text.Contains([accountnumber], "/") or Text.Contains([accountnumber], "-"))
  = Table.ReplaceValue(accounts,".","",Replacer.ReplaceText,{accountnumber}) or Table.ReplaceValue(accounts,"/","",Replacer.ReplaceText,{accountnumber})
or Table.ReplaceValue(accounts,"-","",Replacer.ReplaceText,{accountnumber})

 

is malformed. Please review. The result is a logical comparison between SelectRows and ReplaceValue. Likely not what you intended.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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