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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Match values into a group to create a new column

Is there a way I can pass a list of values from a column to group certain values? 

For instance, if I have the column Produtcs, and I want to create a new column based on the produtcs, so, "BMW","Honda","Ferrari"will be put as Car, and so on.

In another BI tool, i just put an IF statemant and pass the list of values to be put in the group. So once I get into my matrix visual, it will have Car, and below it, the cars' names, the prices, quantity...

 

Any hep will be more than welcome.

Thank you!

3 REPLIES 3
v-sihou-msft
Employee
Employee

@Anonymous

 

You can also use the Group feature in Power BI Desktop:

 

1234.PNG

 

Regards,

 

 

 

 

Anonymous
Not applicable

Hi @v-sihou-msft, I ended up doing that, but unfortunately, it won allow me to put elements inside a subgroup
, for inatance, to put the cars inside BMW, Ferrari, etc


Cars

  BMW

    bmw1

    bmw2

Ferrari

   ferrari1

   ferrari2

Others

 

 

Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, you can add calculated column:

 

Group = SWITCH(TRUE(),Table1[Product] IN {"Honda";"BMW";"Ferrari"},"Car","Other")

 

Regards

 

Victor

Peru




Lima - Peru

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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