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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Rasidul_Hasan
Frequent Visitor

Filter Matrics Based on Combination of AND OR Logic from Multiple Slicers (More then 3 Slicer)

I have 5 Slicers and They are A, B, C, D, & E. I want to Filter Matrics Based on the combination of AND & OR logic between Slicers. Something Like below.

 

Matrics should be Filtered by =  ( A & B )  ||  ( C & D ) || E

                               Example =    ( A  AND  B )  OR  ( C  AND  D ) OR  E

Can Someone Share with me a prototype build on DAX? Using Connected or Disconnected Table/Slicers will work.

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@Rasidul_Hasan That would be something below. Hard to be specific without sample data, etc. Basically an implementation of a Complex Selector. The Complex Selector - Microsoft Power BI Community

Measure =
  VAR __A = SELECTEDVALUE('SlicerTableA'[A])
  VAR __B = SELECTEDVALUE('SlicerTableB'[B])
  VAR __C = SELECTEDVALUE('SlicerTableC'[C])
  VAR __D = SELECTEDVALUE('SlicerTableD'[D])
  VAR __E = SELECTEDVALUE('SlicerTableE'[E])
  VAR __A1 = MAX('Table'[A])
  VAR __B1 = MAX('Table'[B])
  VAR __C1 = MAX('Table'[C])
  VAR __D1 = MAX('Table'[D])
  VAR __E1 = MAX('Table'[E])
RETURN
  SWITCH(TRUE(),
    ( __A = __A1 && __B = __B1 ) || ( __C = __C1 && __D = __D1) || __E = __E1,1,
    0
  )

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1664071700890.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

5 REPLIES 5
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1664071700890.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Great. 😊

Greg_Deckler
Community Champion
Community Champion

@Rasidul_Hasan That would be something below. Hard to be specific without sample data, etc. Basically an implementation of a Complex Selector. The Complex Selector - Microsoft Power BI Community

Measure =
  VAR __A = SELECTEDVALUE('SlicerTableA'[A])
  VAR __B = SELECTEDVALUE('SlicerTableB'[B])
  VAR __C = SELECTEDVALUE('SlicerTableC'[C])
  VAR __D = SELECTEDVALUE('SlicerTableD'[D])
  VAR __E = SELECTEDVALUE('SlicerTableE'[E])
  VAR __A1 = MAX('Table'[A])
  VAR __B1 = MAX('Table'[B])
  VAR __C1 = MAX('Table'[C])
  VAR __D1 = MAX('Table'[D])
  VAR __E1 = MAX('Table'[E])
RETURN
  SWITCH(TRUE(),
    ( __A = __A1 && __B = __B1 ) || ( __C = __C1 && __D = __D1) || __E = __E1,1,
    0
  )

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , Is this solution for the Connected model With Slicers or Discounted Model with Slicers?

Fantastic.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.