Forum Discussion
Filter two tables from one slicer using OR logic
- 4 years ago
Apologies...you need the INTERSECT function. As in
Create the measure :
Or filter = COUNTROWS ( INTERSECT ( VALUES ( 'Ind OU'[OU] ), VALUES ( Computer[OU] ) ) ) + COUNTROWS ( INTERSECT ( VALUES ( 'Ind Users'[Username] ), VALUES ( Computer[Username] ) ) )Add the [Or filter] to the filter for the visual in the filter pane and set the value to greater or equal to 1:
I've attached a sample PBIX file
Maybe...
Create a copy of the user table using
Ind User = 'User'
and another for OU using
Ind OU = DISTINCT (Computer [OU])
Leave these tables unrelated.
Create a measure along the lines of:
Row filter =
COUNTROWS(TREATAS(VALUES ( [Ind User [Username]), Computer[Usernme))
+
COUNTROWS(TREATAS(VALUES(Ind OU [Computer [OU]), Computer [OU]))
now add this [Row filter] measure to the filters for the visual in the filter pane and set the value to greater or equal to 1 and use the fields from the unrelated tables in the slicers
Thanks for the reply but I can't seem to get that to work, what do you think I'm doing wrong?
- PaulDBrown4 years ago
Community Champion
Apologies...you need the INTERSECT function. As in
Create the measure :
Or filter = COUNTROWS ( INTERSECT ( VALUES ( 'Ind OU'[OU] ), VALUES ( Computer[OU] ) ) ) + COUNTROWS ( INTERSECT ( VALUES ( 'Ind Users'[Username] ), VALUES ( Computer[Username] ) ) )Add the [Or filter] to the filter for the visual in the filter pane and set the value to greater or equal to 1:
I've attached a sample PBIX file
- FPackermanGTA4 years ago
Advocate I
Thank you very much and for taking the time to provide the gif and pbix file.
Much appreciated.
Cheers