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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
johnbeaverdam
Frequent Visitor

How to use a set of values as a filter on the same table

I have a large dataset of customer id's (userid) and products (marketid) which they use. 

johnbeaverdam_0-1629892098210.png

 

Now I'm trying to visualize relations in behaviour based on the use of a product.

For example. I can filter which customers use product 7. Now I want to see which other products they use, based on their userid.

 

Is their a way to organically use all user id's in marketid 7 as filter, so I can see what other products these specific users also bought? Subsequentally, I'd like to do the same for user id's in market 8, 9, 10 and so on. 

 

2 REPLIES 2
amitchandak
Super User
Super User

@johnbeaverdam , Plot this measure with product assume customer/s are selected

 


measure =
var _tab = summarize(filter(all(Table), Table[customer] in allselected(Table[Customer])),Table[product])
return
calculate(coutrows(Table), filter(all(Table), Table[product] in _tab))

 

If want avoid all then use independent customer table

 


measure =
var _tab = summarize(filter((Table), Table[customer] in allselected(Customer[Customer])),Table[product])
return
calculate(coutrows(Table), filter((Table), Table[product] in _tab))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I've succesfully constructed the measure, but when I use it in visualization it shows the total number of rows.

johnbeaverdam_0-1629894565816.png


@amitchandak wrote:

@johnbeaverdam, Plot this measure with product assume customer/s are selected

 


What do you mean by this exactly?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.