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.
Hi All,
Happy Friday! So I'm trying to figure out how to replaced values based on another column and have something like this:
= Table.ReplaceValue(#"Removed Columns1", each [A], each if [B] = "inactive" then "B is inactive" else [A], Replacer.ReplaceText, {"A"})
Works great except with one exception. It does not replace null values of col A!
Yeah, I get I can back out and do this by adding a new conditional column or by replacing null with "ugh" and replacing it back to null after I'm done. But this is more about getting better at Power Query M and understanding the forumla. Plus it's Friday and I want to end the week on a win instead of a compromise.
So it feels like there is something very minor we're missing to get it all done in that one line, but haven't had any luck so far. Let me know if you all have any ideas.
Thanks in advance!
Solved! Go to Solution.
Hi @PANDAmonium
I think it is something very minor - try Replacer.ReplaceValue instead of Replacer.ReplaceText and let us know.
Hi @PANDAmonium
I think it is something very minor - try Replacer.ReplaceValue instead of Replacer.ReplaceText and let us know.
That fixed it! I probably autofilled it and didn't notice the difference; then focused only on thinking it was an issue with the second parameter. But yeah, I'll remember that for next time and it should be really helpful here on.
Thanks @Anonymous !
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 |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |