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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Annihilo
Regular Visitor

cross-visual filter issues

Dear Community,

I'm having an issue with visual filtering affecting a measure in an unexpected way.

Background:
There is a group of agents who do various types of services. I want to show the average time the whole group spends on a certain activity vs. selected individual agent. In Visual #1 you can select the agent and in visual #2 you would see the various activities with average time vs the individual agent's average time. It works as expected so far.

Annihilo_0-1638882417776.png

Problem:
When I change interaction of Visual #1 to Visual #2 to 'filter' from 'highlight' the group averages become messed up. (This would be necessary as there are always activities which a certain individual does not perform so they are redundant on Visual #2 above (the bar sections where there is no black bar in the above exhibit).
This is what happens if I change the interaction:

Annihilo_1-1638882678804.png

(the red bars are no longer showing the group average times, but of the selected agent instead)


This is the measure of the group average time.

I'm pretty sure that's what I need to update to fix the issue:

Average time_noowner = [Worktime_noowner]/[Acts_noowner]

where
Worktime_noowner = calculate(sumx(Source,Source[Duration_]),removefilters('Source'[Owner]))
Acts_noowner = calculate(COUNT(Source[Market]),REMOVEFILTERS('Source'[Owner]))

 

1 ACCEPTED SOLUTION

Hi  @Annihilo

 

You need create a new table via code.

Table = VALUES(Data[Name])
 
And replace the [Name] from 'Data' with 'Table'[Name] in first table visual.
Then change Avg_ALL code as the following.
Avg_ALL =
IF( [AverageDuration] = BLANK(), BLANK(),
CALCULATE( [AverageDuration], ALL( 'Table'[Name] ) ) )

Result: 

vchenwuzmsft_1-1639451641716.png

 

 

Your pbix file in the end.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @Annihilo ,

 

A little less able to understand your question.From 'highlight' to 'filter'. as i know form your measure, the result wont change even if you click the owner. Because it has been removed filter on owner. But the black bar result maybe wrong.

Or you can try allexcept() to retrun a table with all filters removed except for the filters on Market column.

if you want more help please share some example data and expect result.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

I use 'highlight' for the bar chart interaction. The 'average all' measure shows 123.61 minutes for the whole group. This is what I'd like to see retained if I switch the interaction to 'filter'.

highlight.png

But there it becomes 123.28. I don't understand the reason.

filter.png

Link for the source pbix file:
Source 

Hi  @Annihilo

 

You need create a new table via code.

Table = VALUES(Data[Name])
 
And replace the [Name] from 'Data' with 'Table'[Name] in first table visual.
Then change Avg_ALL code as the following.
Avg_ALL =
IF( [AverageDuration] = BLANK(), BLANK(),
CALCULATE( [AverageDuration], ALL( 'Table'[Name] ) ) )

Result: 

vchenwuzmsft_1-1639451641716.png

 

 

Your pbix file in the end.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors