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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Conditional Replace Value - Not Working - No Syntax Error

Hi, I'm connected to an SQL Database, doing some data cleaning (translations), and I'm not sure why the Replace Value is not responding. Am I missing something? Screenshot below:

 

Thank you, 
Ovidiu

 

OvidiuNeacsu_0-1641981571290.png

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Try changing the M code in the formula bar from 'Replacer.ReplaceText' to 'Replacer.ReplaceValue'.

 

If this doesn't work, then you can just add a new custom column using the same logic from your replace code.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Yes, the Replacer.ReplaceValue did it. Thank you! 

 

Is ReplaceValue a standard for any format? 

 

I normally use the Replace Values menu to get the formula set up and then I add the conditions... but it always says Replacer.ReplaceText

 

OvidiuNeacsu_0-1641999894075.png

 

@Anonymous ,

 

I'm not 100% sure on the mechanics behind to be honest but, at first glance, ReplaceText should theoretically have worked as you were only dealing with pure text values (not integer, boolean, special etc.). The only thing I can think it might be is that the cells you were trying to replace started as nulls and therefore not text, but wouldn't stake my house on this.

 

As a general rule of thumb with replacing values, if one doesn't work, the other will 🙂

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Try changing the M code in the formula bar from 'Replacer.ReplaceText' to 'Replacer.ReplaceValue'.

 

If this doesn't work, then you can just add a new custom column using the same logic from your replace code.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.