Hi,
I'm working on a table in PowerBI where I need to check a 'Client name' column for certain words, then if those words are present, returning the value in a new column so they can be categorised correctly.
The data looks something like this, where the Client Name column naming convention usually has either 'Direct', 'Secondary' or 'Other' as a prefix.
What I would like to do is create a calculated column named 'Category' that would search the Client Name column for any instances of 'Direct', 'Secondary' or 'Other', then return that same value so it can be used for other visuals and calculations, like in the example below.
Any help would be appreciated.
I'm working on a table in PowerBI where I need to check a 'Client name' column for certain words, then if those words are present, returning the value in a new column so they can be categorised correctly.
The data looks something like this, where the Client Name column naming convention usually has either 'Direct', 'Secondary' or 'Other' as a prefix.
What I would like to do is create a calculated column named 'Category' that would search the Client Name column for any instances of 'Direct', 'Secondary' or 'Other', then return that same value so it can be used for other visuals and calculations, like in the example below.
Client Name | Category |
Direct_ABC | Direct |
Direct_XYZ | Direct |
Direct_RGB | Direct |
Secondary_Day | Secondary |
Secondary_Night | Secondary |
Secondary_Week | Secondary |
Other_Man | Other |
Other_Child | Other |
Other_Woman | Other |
Any help would be appreciated.