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
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
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.