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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
bvilten
Helper III
Helper III

Use of Table.ReplaceValue

Hello,

I am trying to use the Table.ReplaceValue function and not having much success. I have spent much time looking at and trying various solutions to no avail. Most of the solutions I found were simular to Xiaoxin Sheng's answer in post Solved: Replace value in Power Query based on condition - Microsoft Power BI Community

 

#"Replaced Value" = Table.ReplaceValue(#"Changed Type",each [Category],each if [PO]=1006 and [Category]="D" then "C" else [Category],Replacer.ReplaceText,{"Category"})

 

my version is 

#"ReplacedValue" = Table.ReplaceValue(#"Renamed Columns", each [EVP], each if [department] = "Unassigned" then "No Department" else [EVP], Replacer.ReplaceText,{"EVP"})

 

Which of course produces no errors or changes to the EVP column. I am assuming that my version should value in the [department] column and replace the corresponding [EVP] value with "No Department" and if department does not match "Unassigned" then [EVP] would remain as is. Any ideas why this would fail? I am not very clear on what Replacer.ReplaceText is doing so maybe there is a problem there?

 

I would appreciate your help.

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @bvilten 

 

If your problem is not yet solved, can you provide some sample data for testing? What kind of results do you expect and can you show them with pictures as well?

 

Best Regards

 

vanessafvg
Super User
Super User

can you provide some data?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.