Forum Discussion
jbaker15
6 years agoRegular Visitor
Creating a Histrogram that changes based on user filters
I have an interesting problem that I have spent more hours than i'd like to admit trying to figure out. I have the below data set example: 1) wm_week is the year/week of the data point. 2) jj_sa...
jbaker15
6 years agoRegular Visitor
Since calculated columns do not work through filters in real time as you suggest, I tried a different approach but still no luck. This is incredibly frustrating because I am sure there is a simple answer.
I created a Bucket Table to break it down into the groups I want on the Histogram:
I then created a measure to put the data into the bins:
Bins = CALCULATE(DISTINCTCOUNT('Instock L30 Days'[store_nbr]),(FILTER('Instock L30 Days',and(average('Instock L30 Days'[ris]) >= min(Buckets[Min]),average('Instock L30 Days'[ris]) <= MAX(Buckets[Max])))))
The trouble with this method, is it averages everything together into one bucket and does not break the stores out into each bucket.
I need it to average each store and THEN distinct count it into the buckets based on whatever filters are active at the time.
Still lost on this one.