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.
Hi,
I am having trouble filtering a Bar chart with a slicer by average percentages.
The idea is that the Bar chart show the average percentage of something for certain people. I was asked to add a slicer that would filter it so the user can select what range of percentages it want to see. A slicer of the column with percentages will take out percentages and therefore change the average percentage (which is what i want to filter out).
I tried making a table grouped by person and adding the percentage column average. But this will not work as i need to then have slicers to see data by year, month, zone, etc. So i would need to create way too many columns in a really complicated manner to be able to do it like that.
Any other or easy method? I feel like it should be way easier than how im finding it to be. Currently im trying to create some sort of Dax measure that i can put in the bar chart but that at the same time connect to a slicer that goes from 0% to 100%.
Upwards a small example of the slicer and chart in question.
Thanks in advance!
Solved! Go to Solution.
Hi, i was just able to solve it.
I made a Parameter (lets call it "Param") that went from 0% to 100% (could be a table with one column as well). The parameter itself is like a slicer.
Then i created a measure: IF( AVERAGE(Name)<=MAX(Param) && AVERAGE(Name)>=MIN(Param),1,0)
Then i filtered the chart by the values of the measure equal to "1".
That way it works perfectly, with all the other slicers i want or could need to add on the future.
Still many thanks for the quick response. Im not sure if it would work on my specific case (do to the other slicers/filters) but i see the logic itself is quite similar.
@Lucas_LP , Assume you axis column is group and measure used is M1
Create a measure like
=
var _min = minx(allselected(slicer), slicer[Value])
var _max = maxx(allselected(slicer), slicer[Value])
return
calculate([M1], filter(Values(Table[Group]), [M1] >= _min && [M2] <= _Max))
Hi, i was just able to solve it.
I made a Parameter (lets call it "Param") that went from 0% to 100% (could be a table with one column as well). The parameter itself is like a slicer.
Then i created a measure: IF( AVERAGE(Name)<=MAX(Param) && AVERAGE(Name)>=MIN(Param),1,0)
Then i filtered the chart by the values of the measure equal to "1".
That way it works perfectly, with all the other slicers i want or could need to add on the future.
Still many thanks for the quick response. Im not sure if it would work on my specific case (do to the other slicers/filters) but i see the logic itself is quite similar.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |