Forum Discussion
alanc
2 years agoFrequent Visitor
Visual Matrix - controlling filter on another visual
Hi All - I have been struggling with filtering on matrix visual. I have two visuals, Table A visual Matrix and Table B visual. I have a heirachry as shown below on A where I only want the 3rd level (...
TheoC
2 years agoCommunity Champion
Try the following:
Measure #1
SelectedLevel =
VAR _CurrentPath = SELECTEDVALUE ( TableA[HierarchyPath] )
RETURN
PATHLENGTH ( _CurrentPath )
Measure #2
FilterByTagID =
VAR _SelectedTagID = SELECTEDVALUE ( TableA[tagID] )
VAR _HierarchyLevel = [SelectedLevel]
RETURN
IF ( _HierarchyLevel = 3 && NOT ISBLANK ( _SelectedTagID ) , COUNTROWS ( FILTER ( TableB , TableB[tagID] = _SelectedTagID ) ) , BLANK() )
You'll need to apply the filter measure to Visual B to ensure the data in Visual B relates to the tagId selected in Visual A. You're also going to need to use Edit Interactions from Visual A to B.
Obviously, you'll need to modify Measure#2 to your specific table / column names. I haven't validated syntax so may need slight modification.