Forum Discussion
Matching a string to a partial string via a relationship
- Anonymous6 years ago
Hi, I think the best way to solve this is to create an additional table in the model.
SoftwareOrderProducts
OrderID Product 1 Product 7 1 Product 7 2 Product 1 2 Product 7 2 Product 8 2 Product 6 Then you create relationships Order - SoftwareOrderProducts and SoftwareOrderProducts - ProductName.
The comma separated string of products coud be transformed to rows in Power Query.
Best Regards / Ulf
Hi, I think the best way to solve this is to create an additional table in the model.
SoftwareOrderProducts
| OrderID | Product |
| 1 | Product 7 |
| 1 | Product 7 |
| 2 | Product 1 |
| 2 | Product 7 |
| 2 | Product 8 |
| 2 | Product 6 |
Then you create relationships Order - SoftwareOrderProducts and SoftwareOrderProducts - ProductName.
The comma separated string of products coud be transformed to rows in Power Query.
Best Regards / Ulf
- RichardJ6 years agoResponsive Resident
Anonymous and Greg_Deckler - Many thanks for the assistance.
Being able to use this approach of delimiting and splitting the columns into rows opens up lots of new possibilities for my use of Power BI.
I'm still relatively new to Power BI so if it helps anyone
@fhill suggestion here explains how to copy the required columns to a new table
https://community.powerbi.com/t5/Desktop/Copy-two-columns-to-a-new-table/td-p/215860@MACKnox suggestion explains how to split the columns into rows using a delimiter.
https://community.powerbi.com/t5/Desktop/Split-column-not-into-seperate-columns-but-in-rows/td-p/11194