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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rakesh-k01
Frequent Visitor

How to use AND in slicer

This might be a bit hard to explain, so will update based on the info needed. 

 

Hi,

 

I have 2 tables having 1 to many relationship with the ref2per table. Capture.PNG

 

 

 

 

 

 

 

 

I' am using a slicer on ref_table to display the person table details in a matrix.

Below is the output of an example:Capture1.PNG

 Slicer is using OR to display the records having either SAP or EventBrite, but i need person records having both SAP and EventBrite. Below is the expected output.Capture2.PNG

 

 

 

Any thoughts on how this can be done?

 

Thanks

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@rakesh-k01

 

hi, create a measure:

 

Show =
IF ( COUNTROWS ( VALUES ( Ref_Table[name] ) ) = COUNTROWS ( Ref2Per ), 1, 0 )

and in Visual Level Filter select when Show is 1.

 

 

Or Slicer.png

 

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@rakesh-k01

 

hi, create a measure:

 

Show =
IF ( COUNTROWS ( VALUES ( Ref_Table[name] ) ) = COUNTROWS ( Ref2Per ), 1, 0 )

and in Visual Level Filter select when Show is 1.

 

 

Or Slicer.png

 

Regards

 

Victor

Lima - Peru




Lima - Peru

@Vvelarde

 

Hi Victor,

 

Thanks again with the solution. But the measure seems to fails if I have multiple person having same name or if I have same combination of person_id and ref_source_system_id in ref2per table. Below are the two updated table.person.PNG

 

 

ref2per.PNG

Could you please help me with this. Thank you and appreciate your time.

 

Regards,

Rakesh

 

@Vvelarde

 

Hi, Thanks for the response. That actually worked! 

 

It did not work on my existing report not sure why but when I recreated the report from the scratch your solution worked. Thanks a ton. 

 

I have one single doubt though, can we have it as a slicer like an option of "AND" & "OR"?

 

Thanks 

Rakesh

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.