- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Filtering through multiple columns using one filter
Hi everyone,
Let's say I have this type of data :
Offer | Buyer.1 | Buyer.2 | Buyer.3 |
A | Alex | ||
B | Sam | Alex | |
C | John | Sam |
I need a way to filter through buyers using one slicer, for example, if I filter on Alex, expected result should be this :
Offer | Buyer.1 | Buyer.2 | Buyer.3 |
A | Alex | ||
B | Sam | Alex |
Any idea how to achieve this ? thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @ouss102 ,
that is possible.
Create a new table with DAX that you are using as a slicer:
Buyer =
FILTER(
DISTINCT(
UNION(
VALUES( myTable[Buyer.1] ),
VALUES( myTable[Buyer.2] ),
VALUES( myTable[Buyer.3] )
)
),
myTable[Buyer.1]
<> BLANK()
)
As I said, this you can use to slice the names later.
Then you create a measure that checks for every row if the name appears in one of the 3 columns:
ShowRow =
VAR vSelected = ALLSELECTED( Buyer[Buyer] )
VAR vAvailableNamesTable =
FILTER(
DISTINCT(
UNION(
VALUES( myTable[Buyer.1] ),
VALUES( myTable[Buyer.2] ),
VALUES( myTable[Buyer.3] )
)
),
myTable[Buyer.1] <> BLANK()
)
VAR vIntersect = INTERSECT( vSelected, vAvailableNamesTable )
RETURN
COUNTROWS( vIntersect )
Use this measure as a filter for the visual for the table you want to show and filter it to ShowRow = 1:
Then the result is doing exactly what you want:
Please check my demo file:
https://www.swisstransfer.com/d/0dac3f4b-4189-4e0b-b1e9-edaefdbe5c09
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @ouss102 ,
that is possible.
Create a new table with DAX that you are using as a slicer:
Buyer =
FILTER(
DISTINCT(
UNION(
VALUES( myTable[Buyer.1] ),
VALUES( myTable[Buyer.2] ),
VALUES( myTable[Buyer.3] )
)
),
myTable[Buyer.1]
<> BLANK()
)
As I said, this you can use to slice the names later.
Then you create a measure that checks for every row if the name appears in one of the 3 columns:
ShowRow =
VAR vSelected = ALLSELECTED( Buyer[Buyer] )
VAR vAvailableNamesTable =
FILTER(
DISTINCT(
UNION(
VALUES( myTable[Buyer.1] ),
VALUES( myTable[Buyer.2] ),
VALUES( myTable[Buyer.3] )
)
),
myTable[Buyer.1] <> BLANK()
)
VAR vIntersect = INTERSECT( vSelected, vAvailableNamesTable )
RETURN
COUNTROWS( vIntersect )
Use this measure as a filter for the visual for the table you want to show and filter it to ShowRow = 1:
Then the result is doing exactly what you want:
Please check my demo file:
https://www.swisstransfer.com/d/0dac3f4b-4189-4e0b-b1e9-edaefdbe5c09
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I woud modify " is 1" by "more or equal than 1" so that it shows everything when the filter is released, but otherwise I think this might work, thanks !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @ouss102 ,
yes, that's absolutely right. I forgot about the option that there could be more than one 😊
Best regards
Denis

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-27-2023 12:24 AM | |||
02-28-2024 09:59 AM | |||
03-20-2024 06:19 AM | |||
03-01-2024 04:20 AM | |||
11-23-2023 11:42 AM |
User | Count |
---|---|
125 | |
103 | |
84 | |
49 | |
46 |