This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Greeting,
I have a large database in which it is possible to identify related products based on: item number, group, item.
I tried to connect these items and now I want to make a table in which I will have data that are related products.
Example:
Car-12 appears in three places and its related products are visible.
I would like to have a unique table where for each item I have a list of its relatives.
The database is quite large, so I would like to ask for help on how to do it and make it optimal for use.
Thanks a lot in advance!
Solved! Go to Solution.
@mraka9 I wrote this calculated table:
Result =
SELECTCOLUMNS(
GENERATE(
ADDCOLUMNS(
VALUES('Table'[Item]),
"@List", CALCULATE(CONCATENATEX('Table', 'Table'[Summary data], ";"))
),
VAR _current_item = 'Table'[Item]
VAR _current_list = [@List]
RETURN
SELECTCOLUMNS(
FILTER(
VALUES('Table'[Item]),
'Table'[Item] <> _current_item
&& CONTAINSSTRING(_current_list, 'Table'[Item])
),
"Related item", 'Table'[Item]
)
),
"Item", 'Table'[Item],
"Related item", [Related item]
)
Maybe it will work on the full data, but on the sample I'm getting something else for Car -14.
The thing is, can you please explain why an item is a related item. For example, why car 14 has car 33 or ca4 69 as related?
@mraka9 can you share a sample data as a table here so I could copy paste it to PBIX
Thanks in advance
| Item number | Group | Stavka | Item | Summary data |
| 10-1 | 1 | 1 | Car-12 | Car-12;Car-14 |
| 10-1 | 1 | 1 | Car-14 | Car-12;Car-14 |
| 10-1 | 1 | 2 | Bike-77 | Bike-77;Bike-99 |
| 10-1 | 1 | 2 | Bike-99 | Bike-77;Bike-99 |
| 20-1 | 1 | 1 | Car-12 | Car-12;Car-42;Car-33 |
| 20-1 | 1 | 1 | Car-42 | Car-12;Car-42;Car-33 |
| 20-1 | 1 | 1 | Car-33 | Car-12;Car-42;Car-33 |
| 20-1 | 2 | 1 | Mobile-444 | Mobile-444;Mobile-333 |
| 20-1 | 2 | 1 | Mobile-333 | Mobile-444;Mobile-333 |
| 30-1 | 1 | 1 | Car-12 | Car-12;Car-69;Car-777 |
| 30-1 | 1 | 1 | Car-69 | Car-12;Car-69;Car-777 |
| 30-1 | 1 | 1 | Car-777 | Car-12;Car-69;Car-777 |
@mraka9 I wrote this calculated table:
Result =
SELECTCOLUMNS(
GENERATE(
ADDCOLUMNS(
VALUES('Table'[Item]),
"@List", CALCULATE(CONCATENATEX('Table', 'Table'[Summary data], ";"))
),
VAR _current_item = 'Table'[Item]
VAR _current_list = [@List]
RETURN
SELECTCOLUMNS(
FILTER(
VALUES('Table'[Item]),
'Table'[Item] <> _current_item
&& CONTAINSSTRING(_current_list, 'Table'[Item])
),
"Related item", 'Table'[Item]
)
),
"Item", 'Table'[Item],
"Related item", [Related item]
)
Maybe it will work on the full data, but on the sample I'm getting something else for Car -14.
The thing is, can you please explain why an item is a related item. For example, why car 14 has car 33 or ca4 69 as related?
Thank you very much!
This is a genius solution.
You are right, the link is provided in the sample because of the smaller sample.
This is definitely the solution to my problem!
I hope it will also work on large amount of data!
Thanks again!
Greetings
@mraka9 my pleasure 🙂
Hey, check out my showcase report - got some high level stuff there. Sure you will find there a lot of cool ideas.
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂
Thanks again!
I see you have great ideas in the report! I will definitely take a closer look!
Kind regards
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 25 | |
| 24 |