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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ChrisTof
Frequent Visitor

Filter visual table with a measure not dynamically updated

hi,

I'm using the visual table below with this measures.

 

Number of daysType
1170Red
804Red
511Green
355Orange
346Orange
288Green
274Green
268Red
  
12Red
24Green
126Green

 

 

AverageDays = 
var a=SUMX(ALLSELECTED('Table'),'Table'[Number of days])
var b=COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Number of days]<>BLANK()))
return a/b
Measure = IF(MAX('Table'[Number of days])>'Table'[AverageDays],1,0)

 

I use "Measure" to filter my visual table to display values only greater than the average.

ChrisTof_0-1681457863872.png

 

ChrisTof_1-1681457907734.png

 

thanks to @v-tangjie-msft for the solution but i have a question.

 

When i've filtered the visual, i get this :

Number of daysType
511Green
804Red
1170Red

 

Now, i want to let the users to be able to filter by type using slicer. I mean when they select 'Red', they should get this :

Number of daysType
804Red
1170Red

 

But in fact they get this because when they use the slicer 'type' the measure 'AverageDays' is automatically updated. So the AverageDays was 380 and is now 987 and it displays only values greater than this.

Number of daysType
1170Red

 

I've tried using 'modify interactions' for slicer to set 'none' for the measure 'AverageDays' but still not working.

How can i do so the measure isn't updated when using the slicers ?

Thanks a lot again !

1 ACCEPTED SOLUTION

5 REPLIES 5
ChrisTof
Frequent Visitor

I'm a beginner so if you could give me some examples that would be great please.

Thanks again

lbendlin_0-1681724667627.png

see attached

 

lbendlin
Super User
Super User

Remember that the measure is recomputed each time you interact with the visual. So when you remove Green from the filter context your average value shifts and that then results in only one of the Reds showing. It's working as designed.

I agree with you that it's working as designed but it doesn't respond to my use case.

So how can i do that ?

Use disconnected tables and create measures that can serve as visual filters.

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.