Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I have the following problem: In a timesheet database I have two columns with department name. One is the Department of Origin, e.g. IT. The other is the Charged Dept., e.g. Finance.
What happens is that the entry of a person who performed a task to its own department comes with a null value at charged department column, so I would like to apply a text replacement on it, in a way that if the charged department is null it would be replaced by the origin department.
I can solve the problem by creating a new column and using If statements, but I would like to know if it is possible to apply Table.ReplaceValue (or something like that) to change the null entry to the value of the entry of the other column.
I tried the following code, without success:
#"Replaced Value" = Table.ReplaceValue(#"PreviousStep",null, each [OriginDept],Replacer.ReplaceValue,{"ChargedDept"})
Thank you, guys, in advance!
Solved! Go to Solution.
There's probably a way to do that the way you are referring to but you could always do this:
#"Added Conditional Column" = Table.AddColumn(#"Removed Duplicates", "Custom", each if [CcRecipients.Address] = null then [ToRecipients.Address] else [CcRecipients.Address])
Or, this:
#"Replaced Value" = Table.ReplaceValue(#"Added Conditional Column",null,each [ToRecipients.Address],Replacer.ReplaceValue,{"CcRecipients.Address"})
That last one looks like what you were going for, that worked for me as well.
There's probably a way to do that the way you are referring to but you could always do this:
#"Added Conditional Column" = Table.AddColumn(#"Removed Duplicates", "Custom", each if [CcRecipients.Address] = null then [ToRecipients.Address] else [CcRecipients.Address])
Or, this:
#"Replaced Value" = Table.ReplaceValue(#"Added Conditional Column",null,each [ToRecipients.Address],Replacer.ReplaceValue,{"CcRecipients.Address"})
That last one looks like what you were going for, that worked for me as well.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |