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
Anonymous
Not applicable

Remove row in 1st table based on slicer in Table 2

Hi

 

I have 2 tables : Customer table and Product table. These 2 are in 1 to many relationship. Each customer might have different product or even same product. What I'm trying to achieve is that whenever Product slicer is chosen (in this example - to exclude Product 1), customer that has only Product 1 to be excluded. If a customer has Product 1 and 2, he should still be in the list.

 

I have applied filter to exclude product 1, but it still show customer A that has only Product 1.

What would be the best solution on this? Any help greatly appreciated. Thank you.

 

Table 1

CustomerAddressPhone
AX123
BY345
CZ456

 

Table 2

CustomerProduct
A1
B1
B1
B2
C3


Slicer : Table 2 = to exclude Product 1

 

Desire Outcome in table 1

CustomerAddressPhone
BY345
CZ456
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You need to create an unrelated product table as a slicer.

Then create a measure and apply it to the visual level filter.

Measure = IF(ISFILTERED('Table'[Product])&&MAX(Table2[Product]) in VALUES('Table'[Product]),1,0)

test_remove_row.PNG

Sample .pbix

 

Best Regards,
Liang
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

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You need to create an unrelated product table as a slicer.

Then create a measure and apply it to the visual level filter.

Measure = IF(ISFILTERED('Table'[Product])&&MAX(Table2[Product]) in VALUES('Table'[Product]),1,0)

test_remove_row.PNG

Sample .pbix

 

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

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.