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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Search tables with multiple values

Hi,

 

I have two tables where some of the columns contain multiple values. This is the example of 2 tables:

Table 1 (Contacts)

IDNameTerritory InterestProduct TypeInvest
1DianaLocation 1, Location 2, Location 3Type1, Type210000
2BradLocation 1Type 12000
3NagelAllType 220000
4HaroldAllType1, Type24000
6BradLocation 2Type1, Type210000
7DrorAllType 38000
8HaroldLocation 3, Location 4Type1, Type2, Type315000
9StevenLocation 3Type 210000
10BradLocation 4Type32500

 

Table 2 (Products)

Product IDProduct LineProduct TypeLocationsBudget
1Product Line 1Type1Location 2$10,000
2Product Line 2Type2Location 4$15,000
3Product Line 3Type2Location 3$12,500
4Product Line 4Type1, Type2Location 3$8,000
5Product Line 5Type3Location 1$4,000

 

I want to create drop-down filters "Product Type" and "Locations" with unique values from these columns and when a user selects "Type2" (for an example), both tables should list records that contain "Type2" in the column "Product Type". I want to do the same with a selection based on the column "Location".

 

Thank you in advance!

 

 

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. In ordert o get this you should duplicate some rows to expand those values. Go to edit queries. Right click on the column with commas, then split column -> by delimiter. Then open the advanced options and check for "Rows", remove the quotes and click accept. That will create a unique value for the column type for example.

 

The problem with this is that you will have problem with relationships if you do that for product because you are going to have duplicated ids. Then you may want to create a new combined column to have as the key unique column of the table; like product_id + type.

 

Hope this helps,

Regards,

 

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


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

Happy to help!

LaDataWeb Blog

View solution in original post

1 REPLY 1
ibarrau
Super User
Super User

Hi. In ordert o get this you should duplicate some rows to expand those values. Go to edit queries. Right click on the column with commas, then split column -> by delimiter. Then open the advanced options and check for "Rows", remove the quotes and click accept. That will create a unique value for the column type for example.

 

The problem with this is that you will have problem with relationships if you do that for product because you are going to have duplicated ids. Then you may want to create a new combined column to have as the key unique column of the table; like product_id + type.

 

Hope this helps,

Regards,

 

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


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.