I have measure which has values up to trillion. How to make equal ranges for this data in the filter
I want use this as filter in dashboard and each range should show same data.
For example, I’m using a calculated field like this:
IF [Sales]<=500 THEN
"$100-$500"
ELSEIF [Sales]<=2000 THEN
"$1000-$1500"
END.
What I need:
- Each filter option (range) should return approximately the same number of values from Column B.
- The goal is to group the data into equal-sized segments based on sales, not just by fixed numeric thresholds.
@Srividya Ayaluri @Chris Geatch 's suggestion of the use of percentile is certainly the way I'd recommend. Please take another look! Note that percentile is quite different from percent.
Percentile breaks your data set into equal parts by count of elements-- which sounds like what you were after.
If you don't want to write a lot of code to make clean filter labels (and your data is roughly unchanging), you can use percentile to report the rough boundaries of each decile. You can then use those returned values and hard-code your filter boundaries, labeling them however you want and adjusting a bit here and there so you don't have awkward values (who wants 1,487,422 when you could have 1.5m?).
If your data fluctuates a lot, your BINS [filter values] won't be accurate, but this may be a quick and dirty way of doing it.
Michael Hesser (Tableau Forum Ambassador)
If this response has answered your question, kindly click "Best Answer"