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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
thefunnyenterta
Frequent Visitor

Include Slicer1 values & Exclude Slicer B values

Slicer1 selected values should be in the visuals. However, slicer 2 selected values should be excluded from the visuals. Is this possible? and is it possible from this, to have a list of the customers who survived both purges? tahnk you. 

 

customers.PNGll.PNG

For example, i want all customers who bought B but never bought C. Thank you. !

example of problem 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @thefunnyenterta ,

 

Please try:

First create another table for slicer2:

vjianbolimsft_0-1674704757528.png

Then apply the measure to the visual level filter:

Measure = 
var _a = ADDCOLUMNS(FILTER(ALL('Customer purchase'),'Customer purchase'[Customer]=MAX('Customer purchase'[Customer])),"Flag",IF([Product bought] in SELECTCOLUMNS('Product List',"Excluded",[Product list]),1,0))
var _b = SUMX(_a,[Flag])
return IF(_b>0,1,0)

vjianbolimsft_1-1674704791865.png

Final output:

vjianbolimsft_2-1674704827046.png

Best Regards,

Jianbo Li

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

6 REPLIES 6
v-jianboli-msft
Community Support
Community Support

Hi @thefunnyenterta ,

 

Please try:

First create another table for slicer2:

vjianbolimsft_0-1674704757528.png

Then apply the measure to the visual level filter:

Measure = 
var _a = ADDCOLUMNS(FILTER(ALL('Customer purchase'),'Customer purchase'[Customer]=MAX('Customer purchase'[Customer])),"Flag",IF([Product bought] in SELECTCOLUMNS('Product List',"Excluded",[Product list]),1,0))
var _b = SUMX(_a,[Flag])
return IF(_b>0,1,0)

vjianbolimsft_1-1674704791865.png

Final output:

vjianbolimsft_2-1674704827046.png

Best Regards,

Jianbo Li

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

Hey, thank you, this is very good. If I wanted to add an AND logic to both slicers instead of an OR logic, would it be possible? Thank you again ! @v-jianboli-msft 

Hi @thefunnyenterta ,

 

Can you please explain exactly what kind of AND logic you want?

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

 

Best Regards,

Jianbo Li

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

thefunnyenterta
Frequent Visitor

if anyone has any other help to offer, it would be very kind ,thank you!

 

amitchandak
Super User
Super User

@thefunnyenterta , preferably slicer 2 should be on an independent date table

 

Measure =

var _tab = except(allselected(Table1[Column]), allselected(Slicer2[Column]))

return

calculate(Sum(Table[Value]), filter(Table1, Table[Column1] 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

hey @amitchandak, it does not let me filter by Table[Column1] in tab.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors