Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
Could you please advice how to fix this issue?
I need to exclude customers that bought at least one of the selected products. My current solution works if you select only one product, however I need to make it work for multiple selection. thanks 🙂
My main table:
Customer IDProduct
| 1 | a |
| 1 | b |
| 1 | c |
| 1 | d |
| 2 | c |
| 2 | d |
| 2 | f |
| 2 | j |
| 3 | j |
| 3 | a |
| 4 | v |
| 4 | c |
| 4 | t |
| 5 | a |
| 5 | d |
| 6 | f |
| 6 | r |
| 6 | d |
slicer disconnected = VALUES(main[Product])Customer concat = SUMMARIZE('main',main[Customer ID])
calculated column in the 'customer concat' table:
Product_Concat =
CONCATENATEX(
FILTER(
'main',
'main'[Customer ID] = 'Customer concat'[Customer ID]),'main'[Product],
" ; ",'main'[Product],
ASC)
Measure :
Products_exclusion =
VAR _customer = SELECTEDVALUE('main'[Customer ID])
VAR _custmomer_products = SUMMARIZE(FILTER('main','main'[Customer ID]=_customer),main[Product])
VAR _selected_products = ALLSELECTED('slicer disconnected'[Product])
RETURN
IF(
ISFILTERED(
'slicer disconnected'[Product]),
IF(
_selected_products IN _custmomer_products,
0,
1
),
1)
This is my main visual that needs to be filtered correctly based on the slicer selection.
data model:
Solved! Go to Solution.
thanks @amitchandak . I actually managed to solve it after many hours of thinking! 😄
Products_exclusion =
VAR _table = CALCULATETABLE(SUMMARIZE('main','main'[Customer ID]), FILTER(ALL('main'),'main'[Product] IN FILTERS('slicer disconnected'[Product])))
RETURN
IF(
ISFILTERED(
'slicer disconnected'[Product]),
IF(
MAX('Customer concat'[Customer ID]) IN _table,
0,
1
),
1)
@LWOLF , Make sure independent table for the product is used in slicer, I changed the name to product
try measure
Customer concat =
var _cust = except(all(main[Customer ID]) , SUMMARIZE(filter('main',main[Product] in VALUES(Product[Product])), main[Customer ID]))
return
countrows(filter(main, main[Customer ID] in _cust ))
plot this with customer
thanks @amitchandak . I actually managed to solve it after many hours of thinking! 😄
Products_exclusion =
VAR _table = CALCULATETABLE(SUMMARIZE('main','main'[Customer ID]), FILTER(ALL('main'),'main'[Product] IN FILTERS('slicer disconnected'[Product])))
RETURN
IF(
ISFILTERED(
'slicer disconnected'[Product]),
IF(
MAX('Customer concat'[Customer ID]) IN _table,
0,
1
),
1)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 29 | |
| 21 | |
| 12 | |
| 12 |