Forum Discussion
kerch007
5 years agoFrequent Visitor
How to filter a table
Hi. Please help me make a measure that would filter my table. The table should contain only values "group-1" in which there are all values from selected in slicer "group-2" My table: Group-...
- 5 years ago
Small change at the end:
ShowMeasure V2= VAR G2inTable_ = CALCULATETABLE ( DISTINCT ( MyTable[Group-2] ), ALL ( MyTable[Group-2] ) ) VAR G2InSlicer_ = DISTINCT ( SlicerT[Group-2] ) VAR allPresent_ = COUNTROWS ( INTERSECT ( G2inTable_, G2InSlicer_ ) ) = COUNTROWS ( G2InSlicer_ ) RETURN IF ( (allPresent_ || NOT ISFILTERED ( SlicerT[Group-2] )) && SELECTEDVALUE(MyTable[Group-2]) IN G2InSlicer_ , 1, 0 )Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
AlB
5 years agoCommunity Champion
Small change at the end:
ShowMeasure V2=
VAR G2inTable_ =
CALCULATETABLE ( DISTINCT ( MyTable[Group-2] ), ALL ( MyTable[Group-2] ) )
VAR G2InSlicer_ =
DISTINCT ( SlicerT[Group-2] )
VAR allPresent_ =
COUNTROWS ( INTERSECT ( G2inTable_, G2InSlicer_ ) ) = COUNTROWS ( G2InSlicer_ )
RETURN
IF ( (allPresent_ || NOT ISFILTERED ( SlicerT[Group-2] )) && SELECTEDVALUE(MyTable[Group-2]) IN G2InSlicer_ , 1, 0 )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
kerch007
5 years agoFrequent Visitor
Exactly what I need! Thanks!