Forum Discussion
substitute multiple values
- 10 years ago
Anonymous
Please try with nested SUBSTITUTE function with similar DAX formula as below.
Column1_1 = SUBSTITUTE ( SUBSTITUTE ( SUBSTITUTE ( 'Table'[Column1], "Trust", "One" ), "Foundation", "One" ), "Endownment", "One" )Best Regards,
Herbert
- 10 years ago
If you're looking for a dynamic approach I think you need to return to the Query editor and M like this:
http://www.thebiccountant.com/2016/05/22/multiple-replacements-in-power-bi-and-power-query/
Anonymous You can do it using DAX but it is not the only way. Easy way is to use Replace Values function in power bi via query editor. It will replace all occurences but obviously you have to do it few times for each string you want to replace. You can also use Conditional Column feature where you can specify multiple conditions (for multiple strings) and it will result in new column.
Hi ankiipatira,
Can you show me the code for multiple value replacement?
However I am still interested what is the operator for DAX so allow easy replacement for the function.