Forum Discussion
dhodgson
3 years agoFrequent Visitor
Replace Column Values
Hi, I need to be able to replace all the values in the 'Trade Engagement' column to look like the below when 'EmployeeID' is NOT "1.Subcontractor" or blank. EmployeeID Trade Engagement ...
- 3 years ago
btw, the first reply is for DAX, it works like:
FreemanZ
3 years agoSuper User
hi dhodgson
not very clear. do you mean something like:
Column =
IF(
[EmployeeID] IN {"1.Subcontractor", BLANK()},
[Trade Engagement],
"Company"
)
dhodgson
3 years agoFrequent Visitor
That forumla isn't wokring. All I did was duplicate the EmployeeID column and renamed to 'trade engagement'. I then need to replace all values to 'Company' if they are not 1.subcontractor or a blank field. I tried using the below, however it replaces all text with "Company";
= Table.ReplaceValue(#"Renamed Columns1", each [Trade Engagement], each if [employeeid] <> "1.SUBCONTRACTOR" then "Company" else [Trade Engagement], Replacer.ReplaceText,{"Trade Engagement"})