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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Kirt1965
Helper III
Helper III

Replacing value with null not working

Hello all,

 

I am trying to do a conditional replace to null and it is not working.  Under a specific circumstance an employee ID and his/her supervisor's ID will be the same.  In that situation, I want to set the supervisor ID to null.  My code is below, but it doesn't work.  The only time I can get replacing to null to work is if I enter null directly into the Replace values... dialog box from the context menu right clicking on the column name.  I need it to work dynamically as below.

 

Table.ReplaceValue(#"Filtered rows", each [SUPERVISOR_ID], each if [SUPERVISOR_ID] = [EMPLID] then null else [SUPERVISOR_ID], Replacer.ReplaceText, {"SUPERVISOR_ID"})
1 ACCEPTED SOLUTION
Kirt1965
Helper III
Helper III

I got it to work.  I forgot that you have to use ReplaceValue instead of ReplaceText.

View solution in original post

2 REPLIES 2
spinfuzer
Solution Sage
Solution Sage

Replacer.ReplaceValue instead of Replacer.ReplaceText

Kirt1965
Helper III
Helper III

I got it to work.  I forgot that you have to use ReplaceValue instead of ReplaceText.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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