Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I have a dataset with two specific columns, Marketing_grouping and campaign_name. I want to create a new column that reads the text string in the campaign_name column and returns a value. We want to identify if the campaign is a Brand or NonBrand campaign. There are other campaigns that are not Brand or Nonbrand specific, so if possible, the new column would return the Marketing grouping. Essentially we are splitting the Marketing_Grouping, Paid Search, into 2 groups, brand and nonbrand, and using the campaign name column to identify. Also, there are paid search campaigns that do no have brand or nonbrand in Its name and we will group them under nonbrand
** Case sensitive:
If campaign_name contains NB, Non, non, Non-Brand, and Marketing group = Paid Search, then NB
If Campaign_Name contains Brand, BR, and marketing group = Paid Search, then Brand
If Marketing_group = Paid Search and Campaign name doesn't contain any of the above, then NB
Else, Marketing_Group (all other non paid search campaigns, use marketing group)
Solved! Go to Solution.
Hi,
I wanted to provide an update that I figured out a solution. See code below.
Thanks @amitchandak !
But now I am getting an error message, and I still need a formula for all other paid search campaigns that do not have the criteria in the formulas below
Hi,
I wanted to provide an update that I figured out a solution. See code below.
@Bgordon10 , You can use Switch and find in DAx to create a new column
SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |