Forum Discussion
Create a custom column that filters only specific text values M Query
- 5 years ago
Ok, I found the following solution to work for my case:
= Table.AddColumn(#"Added Conditional Column", "Name", each if Text.Contains([Contacts],"Jake") then 1
else if Text.Contains([Contacts],"Jane") then 1
else if Text.Contains([Contacts],"Betty") then 1
...
else 0)
The only note! is that if a value is written jake instead of Jake it will not get it, so its case sensitive. Hope this helps to others having my problem 🙂
Ok, I found the following solution to work for my case:
= Table.AddColumn(#"Added Conditional Column", "Name", each if Text.Contains([Contacts],"Jake") then 1
else if Text.Contains([Contacts],"Jane") then 1
else if Text.Contains([Contacts],"Betty") then 1
...
else 0)
The only note! is that if a value is written jake instead of Jake it will not get it, so its case sensitive. Hope this helps to others having my problem 🙂