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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
danielgnic
Frequent Visitor

How to concatenate a list of products by customer (product combos)

Hello, I have of list of transactions by customers like this:

Customer IDProduct
1A
1B
1C
2A
3A
3C
4A
4D
5

B

 

I need to figure out the combinations of products by customer, something like this:

Customer IDProduct Combo
1A, B, C
2A
3A, C
4A, D

Also, I would like to be able to filter this product combos considering just customers who bought product "A" or product "A" and other.

 

Finally, I expect to have a visualization with this information:

Top Product CombosTop Product Combos
A, B56
A, C34
A23
A, D16

Top product combos is the frequence in which a customer buys "A,B".

 

 

Thank you in advance 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @danielgnic ,

I have created a simple smaple, please refer to it to see if it helps you.

Create a column first.

Column = VAR _1= CONCATENATEX(FILTER('Table','Table'[customer id]=EARLIER('Table'[customer id])),'Table'[product],",")
RETURN
IF(CONTAINSSTRING(_1,"A"),_1,BLANK())

Then create a measure.

Measure = CALCULATE(DISTINCTCOUNT('Table'[customer id]),FILTER(ALL('Table'),'Table'[Column]=SELECTEDVALUE('Table'[Column])))

vpollymsft_0-1678670418112.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @danielgnic ,

Sorry I am foolish. In the last table the value of A,B is 56, how is it calculated? And there is the value A,B,C in the second table, why it disappeared in the last table? I can understand the data in the second table, but I am very confused about the third table.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, @Anonymous , thank you for your reply. The numbers in the last table were an example, I'm sorry for not being totally clear about it. Concerning the "A, B, C" combo, you're right, it disappeared but I didn't mean to do it lol. 

 

This is what I have:

danielgnic_4-1678459209730.png

 

And this is what I would like to calculate:

danielgnic_2-1678459163951.png

IAs you can see, I'm not counting customer 4 because they didn't buy product A

 

And finally:

danielgnic_3-1678459177127.png

 

 

 

Anonymous
Not applicable

Hi @danielgnic ,

I have created a simple smaple, please refer to it to see if it helps you.

Create a column first.

Column = VAR _1= CONCATENATEX(FILTER('Table','Table'[customer id]=EARLIER('Table'[customer id])),'Table'[product],",")
RETURN
IF(CONTAINSSTRING(_1,"A"),_1,BLANK())

Then create a measure.

Measure = CALCULATE(DISTINCTCOUNT('Table'[customer id]),FILTER(ALL('Table'),'Table'[Column]=SELECTEDVALUE('Table'[Column])))

vpollymsft_0-1678670418112.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors