Seaching a column for different text values, then returning that same text

ACUK

New Member
Joined
Dec 23, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
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.


Client NameCategory
Direct_ABCDirect
Direct_XYZDirect
Direct_RGBDirect
Secondary_DaySecondary
Secondary_NightSecondary
Secondary_WeekSecondary
Other_ManOther
Other_ChildOther
Other_WomanOther

Any help would be appreciated.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Have now resolved this myself using the SWITCH function.
 
Upvote 0

Forum statistics

Threads
1,223,667
Messages
6,173,674
Members
452,527
Latest member
ineedexcelhelptoday

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top