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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mmcanelly
Helper I
Helper I

Visual Interactions - visual-level filters being transferred when interacting with visual

I am running into an issue where filters that are set on one chart are transferring over to another when I interact with the chart. Here are the basics of the visuals I'm working with:

 

Visual 1: Bar Chart

  • Categorical "Business Unit" variable along y-axis and Total Sales $ along x-axis
  • A visual-level filter set to only show totals for the current period (Period = "Current")

Visual 2: Line Chart

  • Weekly dates along x-axis and total # of Customers along y-axis
  • A visual-level filter set to only show past periods (Period = "Past")

Here is the desired behavior: I want the user to be able to click one of the bars for a specific Business Unit on Visual 1, and then I want Visual 2 to filter down to show the weekly data for that Business Unit. However, what I find is happening is that in addition to filtering by Business Unit when I click the bar, it is also applying the Period = "Current" filter from Visual 1 onto Visual 2. This conflicts with the filter already set on Visual 2 (Period = "Past") and so the line chart shows no data.

 

Is there a way to only transfer info for the variable assigned to the y-axis (Business Unit) as a filter when clicking the bar on Visual 1, without also transferring all the other filters set on that visual?

1 ACCEPTED SOLUTION
CoreyP
Solution Sage
Solution Sage

Interactions between visuals transfer all filter context. To get around this, rather than applying a filter to your visual, you can add filter context to your measure. For example, on your first visual, remove the filter. Then write your measure something like this:
Current Period Total Sales = CALCULATE( [TotalSales] , 'Table'[Period] = "Current" )

View solution in original post

2 REPLIES 2
mmcanelly
Helper I
Helper I

Thank you @CoreyP! This solved the issue.

CoreyP
Solution Sage
Solution Sage

Interactions between visuals transfer all filter context. To get around this, rather than applying a filter to your visual, you can add filter context to your measure. For example, on your first visual, remove the filter. Then write your measure something like this:
Current Period Total Sales = CALCULATE( [TotalSales] , 'Table'[Period] = "Current" )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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