Forum Discussion
Orthogonal filtering
- Anonymous4 years ago
Hi Pavel_Ischenko ,
Try to create this measure
Measure = VAR _count = CALCULATE ( COUNT ( 'Table'[Result] ), FILTER ( ALLSELECTED ( 'Table' ), [TRILD] = MAX ( 'Table'[TRILD] ) ) ) VAR _count2 = CALCULATE ( DISTINCTCOUNT ( 'Table'[HGHNM] ), ALLSELECTED ( 'Table' ) ) RETURN IF ( ISFILTERED('Table'[HGHNM])&&_count = _count2, 1 )Then put the measure into Filters and set as follows
When filtering, see the results
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
What do your data table(s) look like?
Hello.
Table is like
- AlexisOlson4 years agoSuper User
Create a new calculated table to use as your slicer and column values for the matrix.
Slicer = VALUES ( Table1[HGHNM] )Then define a measure to check whether the set of selected products is the same as the set of products for the given TRLID.
ResultSliced = VAR SlicerValues = ALLSELECTED ( Slicer[HGHNM] ) VAR TRLValues = VALUES ( Table1[HGHNM] ) VAR SharedCount = COUNTROWS ( INTERSECT ( SlicerValues, TRLValues ) ) RETURN IF ( COUNTROWS ( SlicerValues ) = SharedCount && COUNTROWS ( TRLValues ) = SharedCount, CALCULATE ( SUM ( Table1[Result] ), Table1[HGHNM] IN VALUES ( Slicer[HGHNM] ) ) )Note: I check set equality here by taking the intersection of the two sets and checking if that has the same cardinality as each of the sets being intersected. If both A and B only contain values from A ∩ B, then these sets much be equal.