Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
74 | |
63 | |
51 | |
47 |
User | Count |
---|---|
211 | |
85 | |
64 | |
59 | |
56 |