Forum Discussion
mikhailry
5 years agoFrequent Visitor
Measure slicer
Hi everyone, I was wondering if you guys can help with tips and tricks on how to slice the data based on an aggregated column. I have raw data stored in the Sessions table like this: ...
amitchandak
5 years agoSuper User
mikhailry , assuming view is measure and you want to control it by slicer viewslicer
Measure =
var _min = minx(allselected(Viewsslicer), Viewsslicer[values])
var _max = maxx(allselected(Viewsslicer), Viewsslicer[values])
return
Sumx(values(Table[Article]), if([Views] >=_min && [Views] <=Max , [View], blank()))
mikhailry
5 years agoFrequent Visitor
Hey amitchandak ,
Thanks for your response.
I'm not sure that I'm following your solution. Let me try to elaborate on the problem.
Per my understanding, I need to create the following:
1. Measure to calculate Total Views in the table. I guess it should be something like that:
views_m = CALCULATE(sum(sessions[Views]), ALLSELECTED(sessions[Website]))
2. Column or table to feed the slicer (can't assign a measure to the slicer). The max and min values in the slicer should be dynamic, based on selection in other filters, for example, if 'website 1' filter is checked, the slicer's min value should be 100 and a max value = 200.
And if I change the min value in the slicer to be 150, I shoud see only one row in the table - article 2 | 200.
Is that a right logic?
Thanks