cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Anonymous
Not applicable

## Agregate rows by family type

Hello all.

I have the following problem: My dataset has a bunch of rows that correspond to each product ordered by a customer, and each product has a family type associated:

NumOrder SKU        Family type

1                 1234           Baby

1                  1245          Kid

This example represents an order of 2 units, with 2 different family types. The family types that I have are: Baby, Kid, Woman, Men, Men&Acessories; Woman&Acessories, Shoes.

I want to create a calculated column that if an order has only Baby, display "baby", and so on. But if an order  has at least one product that is baby and kid, displays "Baby_Kid" and so on. For all combinations.

Can you help me?

Thank you!

1 ACCEPTED SOLUTION
Super User

@Anonymous

I did not fully understand but this should be close:

``````Column =
CONCATENATEX(
CALCULATETABLE( VALUES(Table4[Family Type]) , ALLEXCEPT(Table4,Table4[Number])),
Table4[Family Type],"|"
)``````

Did I answer your question? Mark my post as a solution! and hit thumbs up
3 REPLIES 3
Super User

@Anonymous

I did not fully understand but this should be close:

``````Column =
CONCATENATEX(
CALCULATETABLE( VALUES(Table4[Family Type]) , ALLEXCEPT(Table4,Table4[Number])),
Table4[Family Type],"|"
)``````

Did I answer your question? Mark my post as a solution! and hit thumbs up
Anonymous
Not applicable

It is almost this. The problem is that Child| Baby and Baby| Child is the same category but I have two different categories.

Super User

@Anonymous
Then you need to provide a propper example and show all possible scenarios.

Did I answer your question? Mark my post as a solution! and hit thumbs up

Announcements

#### Power BI Monthly Update - November 2023

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

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors