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!
I want to replace the value in one column if the value in a second column equals a criteria.
For example
Column A Column B
A 1
B 2
I want to use the advanced editor so that if Column B=2, then Column A=C to get the result:
Column A Column B
A 1
C 2
I have been trying to use this:
#"Replaced Value" = if (each[Column B]=2) then Table.ReplaceValue(#"Table name", "B", "C",Text.Replace, {"Column A"} ) else null
But it is not working..Any ideas that don't require to use a conditional column (I have to do this replacements on a lot of columns...)
Sorry for the late response, I tried this on my own after posting the query and it worked as you have suggested. Thanks for your help and suggestions.
Hi @Barbs10,
Why don't you consider that solution using a conditional column? I think this is a very simple and valid solution in this scenario. For more advice, please make it more specific about your actual scenario.
Thanks,
Yuliana Gu
Hi @Barbs10
Please follow the link
specifically the content by LaurentCouartou.
After that Delete the orginal column A and rename the MyNewColumn as Column A
If this works please accept as solution and also give KUDOS to me and the linked article contributors.
Cheers
CheenuSing
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |