Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
petetai
Regular Visitor

Apply AND logic to filter a visualisation using multiple selections in another

Hi,

 

A very simplified version of my database has three tables:
* Stops stores the locations of bus stops (primary key: StopID)

* Journeys stores the details of various passenger journeys (e.g. start time, origin, destination and primary key JourneyID)

* StopJourneyMap lists which journeys go past which stops. I.e. it has just two columns: StopID and JourneyID

 

Ultimately what I'd like to do is let the user select some stops in a table visualisation and then in a map visualisation show the origins and destinations of journeys that go past those selected stops.

 

Crucially though I'd like to show only the journeys that go past ALL of the selected stops. Currently I'm struggling with that first step. I've got two table visualisations - One that shows the Stops table and another that shows the StopJourneyMap table. When the user clicks on a row in the Stops table visualisation, it filters the StopJourneyMap to show which journeys go through that stop, which is fine. However, when the user selects another stop (Ctrl+click), the StopJourneyMap table is filtered to show all journeys that go through either stop. How can I change that behaviour so that the StopJourneyMap table is filtered to show only journeys that go through *both* the selected stops?

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@petetai,

 

Try using INTERSECT Function in your measure.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
petetai
Regular Visitor

Still struggling with this. I created a measure that calculates how many stops have been selected and a then tried to apply this as a filter to filter for routeIDs that are associated with that many stops. But I couldn't get this to work. So perhaps measures were a red herring.

 

I'd be grateful for any pointers.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.