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
jessicarocha
Helper IV
Helper IV

Only show products that were bought by all selected customers

Hi everyone, 

 

I would like to create a filter that gives the option for the user to only see the products in common by all the selected customers. So, to see which products were bought by ALL the selected customers.

For my analysis it is interesting to see the ABC table. However, if it is better to do a formula with a numeric metric, it is possible to use quantity because when there is no quantity sold, there is no ABC classification for us.

 

Is it possible to achieve this?

Below is the link of the dummy file for download:

 

Dummy file 

 

filter example.jpg

Thank you in advance!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jessicarocha , Product Having all customers

 

measure =
var _cnt = calculate(distinctcount(Sales[Customer ID]), allselected(Sales))
return
countx(filter(Summarize(Sales, Product[Product ID], "_1", distinctcount(Sales[Customer ID])), [_1] =_cnt), [Product ID])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@jessicarocha , Product Having all customers

 

measure =
var _cnt = calculate(distinctcount(Sales[Customer ID]), allselected(Sales))
return
countx(filter(Summarize(Sales, Product[Product ID], "_1", distinctcount(Sales[Customer ID])), [_1] =_cnt), [Product ID])

Hi @amitchandak ,

 

Thank you so much! This is what I need. Just another thing: is it possible to put this as a filter in a slicer and not only as a filter in each individual table?
so can be iteractive for the user?

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.