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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Grouping one value in two groups

I am trying to group data of a column. I want to group one value in two groups, how to do it?

 

For Example:  I am creating new column of group called Z. The column has multiple cities name of USA.

Now I am grouping them into two -A and B.

Now city "San Jose" need to be grouped as A and B also. But I am able to put it in group A OR group B. Here I want it to put in A&B both. What is the solution?

Please help!

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 
Are you expecting something like this?

 

Vpazhenmsft_0-1628731286911.png

 

 

Paul Zheng _ Community Support Tea

View solution in original post

6 REPLIES 6
V-pazhen-msft
Community Support
Community Support

@Anonymous 
Are you expecting something like this?

 

Vpazhenmsft_0-1628731286911.png

 

 

Paul Zheng _ Community Support Tea

Anonymous
Not applicable

@V-pazhen-msft I think this might work for small data.

For large data the nested IF with be very lengthy.

 

This solves my problem. I have to create a big DAX for it!

 

Thanks.

amitchandak
Super User
Super User

@Anonymous , Have two columns One for A and one for B

 

Have a city table with the group where you have rows for both A and B, you need to create a many to many birection join to filter

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@amitchandak Thanks for your reply.

 

1.Imagine I have 100s of rows of data. I cannot create different columns for issues like this. The number of columns will get increasing for large data.

 

2. I want to use this column Z as slicer to filter data according to the grouping.

@Anonymous , You can have comma separated.

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@amitchandak Sorry dear all the data is sensitive can't share.

 

And how to separate it with comma? Can you please help with this? 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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