Forum Discussion
Conditional Column in M using another table as a reference
- 6 years ago
DebbieE see attached, there are two tables, "search and replace" table is the one used for dynamic replace, it will search the text in "search" column (regardless of length) and replace the value from "replace" column
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Hi DebbieE ,
Try to use DAX to create a calculated column, you can use IF() or SWITCH() function.
Column =
IF(
table[column] in {"TYE", "COP", "HAE" ,"NOP", "WEP"},
TRUE(),
FALSE()
)
Or you can do like this.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The hardcoded version is exactly what im trying to avoid doing
- parry2k6 years agoSuper User
DebbieE see attached, there are two tables, "search and replace" table is the one used for dynamic replace, it will search the text in "search" column (regardless of length) and replace the value from "replace" column
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
- DebbieE6 years agoCommunity Champion
thank you so much.
I will block some time out on monday to go through it