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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
bnjmnnl
Helper III
Helper III

Countrows with some filtering

Hello! 

I was wondering how to achieve the following:

My data has shipment information, which contians, for example, the customers and the start and end location. I need a Card visual to display all performed shipments. When a customer is filtered via slicer and/or clicking in visual, this card needs to display the shipments for this customer. But it may not be filtered any more than this (except date filters). When I (on a map-visual) click on a start or end location this value must not change, and keep showing the total amount for this customer. Is this achievable?


1 ACCEPTED SOLUTION
Shivu-2000
Super User
Super User

Hi @bnjmnnl 

As per my understanding your Requirement: 

You want a Card visual in Power BI that displays the total number of shipments for a selected customer and date, but should:

  • Not change when interacting with a map visual (e.g., clicking on Start or End Location)

  • Still reflect filters from customer slicers or other visuals related to the customer or date.

My solution to this is:

1. Create a DAX Measure:

In your Fact Shipments table, create a measure that ignores location filters but still respects customer and date filters:

CustomerShipmentCount = CALCULATE ( COUNTROWS ( Shipments ), REMOVEFILTERS ( Shipments[StartLocation], Shipments[EndLocation] )

This ensures:

  • The measure is not affected by filters on StartLocation and EndLocation

But it still responds to slicers/filters on Customer and Date

2. Use Edit Interactions:

To prevent the Map visual (or any other visual) from affecting the Card:

  • Select the Card visual

  • Go to the top menu: Format → Edit Interactions

  • Click on the Map visual

  • Set the interaction to “None” (the circle-with-slash icon 🚫)

This disables the map's ability to filter the card but keeps other filters (like Customer slicers) intact.

As a Result you will have:

  • Your Card visual displays total shipments for the selected customer and date

  • It ignores interactions from map visuals showing start/end locations

  • It remains dynamic and responsive to slicers for Customer and Date 

If you find this insightful, please provide a Kudo and accept this as a solution.

View solution in original post

2 REPLIES 2
Shivu-2000
Super User
Super User

Hi @bnjmnnl 

As per my understanding your Requirement: 

You want a Card visual in Power BI that displays the total number of shipments for a selected customer and date, but should:

  • Not change when interacting with a map visual (e.g., clicking on Start or End Location)

  • Still reflect filters from customer slicers or other visuals related to the customer or date.

My solution to this is:

1. Create a DAX Measure:

In your Fact Shipments table, create a measure that ignores location filters but still respects customer and date filters:

CustomerShipmentCount = CALCULATE ( COUNTROWS ( Shipments ), REMOVEFILTERS ( Shipments[StartLocation], Shipments[EndLocation] )

This ensures:

  • The measure is not affected by filters on StartLocation and EndLocation

But it still responds to slicers/filters on Customer and Date

2. Use Edit Interactions:

To prevent the Map visual (or any other visual) from affecting the Card:

  • Select the Card visual

  • Go to the top menu: Format → Edit Interactions

  • Click on the Map visual

  • Set the interaction to “None” (the circle-with-slash icon 🚫)

This disables the map's ability to filter the card but keeps other filters (like Customer slicers) intact.

As a Result you will have:

  • Your Card visual displays total shipments for the selected customer and date

  • It ignores interactions from map visuals showing start/end locations

  • It remains dynamic and responsive to slicers for Customer and Date 

If you find this insightful, please provide a Kudo and accept this as a solution.

Thank you for the answer. However:
interactions is not preffered as I would also use this value in other measures to calculate % etc. Next to that, is there a viceversa way to achieve? One that does not tell to ignore those two columns, but a way to tell to only filter on customer and date? As all other slicer(and visual)selections should not affect this value

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.