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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Cblankenship
New Member

slicers must match all data

I am attempting to do a multiple select on my slicers. It is returning it in an OR statement. I would like for it to return in an AND statement. 

 

For example:

 

If Property X is Gulf Front and Full Ocean View and Property A is Gulf Front and Partial Ocean view. In my slicer, i want to select Gulf Front, Full Ocean View. Currently it is returning properties A and X. because they both have Gulf Front Selected. I would like for it to only return property X. Any ideas?

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

HI @Cblankenship,

 

Slicer can't direct achieve 'and' operation, I'd like to suggest you write a measure to check tag, then use this measure to filter table.

 

Below is the sample.

 

Sample tables:

 

Test = DATATABLE("Type",STRING,{{"A"},{"B"},{"C"},{"A,B"},{"A,C"},{"B,C"},{"A,B,C"}}) 

Selector Table = DATATABLE("Item",STRING,{{"A"},{"B"},{"C"}})

 

Measrue:

 

Select Tag = 
var currnet_Item=LASTNONBLANK(Test[Type],[Type])
return
IF(currnet_Item=CONCATENATEX(ALLSELECTED('Selector Table'[Item]),[Item],","),1,0)

 

Use 'Selector Table' as the source of slicer, create table visual and drag measure as visual level filter.

1.PNG2.PNG3.PNG4.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @Cblankenship,

 

Slicer can't direct achieve 'and' operation, I'd like to suggest you write a measure to check tag, then use this measure to filter table.

 

Below is the sample.

 

Sample tables:

 

Test = DATATABLE("Type",STRING,{{"A"},{"B"},{"C"},{"A,B"},{"A,C"},{"B,C"},{"A,B,C"}}) 

Selector Table = DATATABLE("Item",STRING,{{"A"},{"B"},{"C"}})

 

Measrue:

 

Select Tag = 
var currnet_Item=LASTNONBLANK(Test[Type],[Type])
return
IF(currnet_Item=CONCATENATEX(ALLSELECTED('Selector Table'[Item]),[Item],","),1,0)

 

Use 'Selector Table' as the source of slicer, create table visual and drag measure as visual level filter.

1.PNG2.PNG3.PNG4.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.