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
robyfauves
Frequent Visitor

Slicers matching all selection

Hi,

 

I have been trying to crate a slicer in which all condition need to be true.

 

Normally a slicer would use an OR condition in filtering and I need to to use an AND instead.

 

To give you an example I want to select accounts which have purchased specificl multiple products. Calling products Prod1, Prod2 and Prod3 if I create a slicer selecting Prod1 and Prod2 the list of account I have is for people having EITHER Prod1 or Prod2 while I need accounts having both.

 

Is there a workaround I can adopt?

 

Thanks

8 REPLIES 8
atif-hafeez
Helper I
Helper I

Are you sure about your statement? If you select product1 and then ctrl-select product2, you should see results for both product1 and product2

Sorry I might not have explained myself properly. 

 

Yes if I ctrl-select the two products it shows both of them but works with a logic of either-or.

 

To give you an example If I select Prod1 alone it gives me 10137 records, Prod2 alone gives 381 records. Selecting both the records are 10313 as some records bought both Prod1 and Prod2. What I would like the slicer to do is to show me the 205 records owning both Prod1 and Prod2. 

 

Is there any way to do so?

Can you provide details about the schema of the filtered table and its relation with the slicer?

Capture.PNG

 

This is the current schema. The table Owned has one line per account per product and it filters the Accounts one having one line per account.

OK, so you are trying to filter 1 side (Accounts) using the column AllProductsOwned(slicer) in the many side (Owned)? Is this correct?

Yes.

 

The name AllProductsOwned is misleading at it only contains one product per line (it was left from one of my tentatives)

Hi @robyfauves ,

Have you solved the problem with the suggestion of atif-hafeez ?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share a simple data sample which could reproduce your scenario so that we could help further on it.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I see. I think this is more of a modelling issue. 

 

What i would suggest you do is,

  • Create a new table with all the distinct values from AllProductsOwned Column.
  • Create a one to many relationship between the New Products Table and Owned Table. 
  • Use the new Products column as a slicer and the Owned Table as a filtered table.

I am sure you will get the correct counts.

 

Many experts suggest not using bi-directional filter except for some rare scenarios.

 

 

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.

Top Solution Authors