hi,
I'm using the visual table below with this measures.
Number of days | Type |
1170 | Red |
804 | Red |
511 | Green |
355 | Orange |
346 | Orange |
288 | Green |
274 | Green |
268 | Red |
12 | Red |
24 | Green |
126 | Green |
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.
thanks to @v-tangjie-msft for the solution but i have a question.
When i've filtered the visual, i get this :
Number of days | Type |
511 | Green |
804 | Red |
1170 | Red |
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 days | Type |
804 | Red |
1170 | Red |
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 days | Type |
1170 | Red |
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 !
Solved! Go to Solution.
I'm a beginner so if you could give me some examples that would be great please.
Thanks again
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.