Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Mk60
Resolver I
Resolver I

Custom Column or Measure?

My very first question, new to Power Bi. I am trying to find the way to create new measure or new column called "NewProduct" using text values from the existing column. So I tried to use simple If statement to select yellow values and name them "ProductA", and select several other blue highlighted values as "ProductB", and ignore the rest of the values in the existing column, but could not find dax expression for it. So what is the best way to use these parameters from my existing column to create new values in a new column. Much apprecite any help.

Mk60_0-1701278518752.png

 

 

2 ACCEPTED SOLUTIONS
barritown
Super User
Super User

Hi @Mk60,

 

I'd recommend you to check the SWITCH function.

 

You could do something like this:

barritown_0-1701335026736.png

In plain text:

Calculated Column = 
SWITCH ( TRUE (), 
[Value] IN { "CC-20b", "CC-50b", "CC-50d", "CC-50n" }, "Product A",
[Value] IN { "83", "888", "98", "CC-75" }, "Product B",
BLANK () )

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

View solution in original post

So happy to receive my very first reply with a great DAX suggestion that worked for me! Thanks so much, Alexander! Greatly apprecite your time and consideration to respond to a brand new user 🙂

View solution in original post

2 REPLIES 2
barritown
Super User
Super User

Hi @Mk60,

 

I'd recommend you to check the SWITCH function.

 

You could do something like this:

barritown_0-1701335026736.png

In plain text:

Calculated Column = 
SWITCH ( TRUE (), 
[Value] IN { "CC-20b", "CC-50b", "CC-50d", "CC-50n" }, "Product A",
[Value] IN { "83", "888", "98", "CC-75" }, "Product B",
BLANK () )

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

So happy to receive my very first reply with a great DAX suggestion that worked for me! Thanks so much, Alexander! Greatly apprecite your time and consideration to respond to a brand new user 🙂

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.