I did something quite similar to this last year [only I needed to show a stacked bar of top 25%, bottom 25% and the average].
Apologies I haven't time to open your source (shall do that later this evening once I'm home), though if its anything like mine, it's probably going to require several table calcs, lookups and window calcs to achieve.
My thread may be of use > http://community.tableau.com/thread/119192 particularly with reference to Joe's mock-up.
Failing this maybe Joe Mako shall be able to help
make a calculation filed in which take index() function and then put into the filter then click on icon top,then select the top 10 or whatever you want.Similar use another calculated field with function index() and put into filter again and select the bottom 10 from drop down.you will get the top n and bottom n
Thanks Steve. I was hoping for a simpler solution, but I don't think that's going to materialise, so I will try and get my head around this.
Kishore, unfortunately when you create the second index function and and it to the filters shelf, it applies a filter on-top of the first filter, so you can only filter the top n and not select the bottom n
Also to add to this, top/bottom n is usually applied to a dimension which needs to be sorted based on the top/bottom so really, I don't see this working as expected. Sorry Kishore
I have created a dashboard displaying the Top & Bottom 5 customers, kindly have a look at it and let me know if it fulfills your requirement. Wishing you a great weekend ahead!
Top & Bottom2.twbx.zip 1.9 MB
This looks very close to what I need.
Just to check - would your example work if you were also making a loss per customer, and would it display on your Top & Bottom chart? E.g. If customer 'Leigh Burnette Hurley' had negative sales of $90,000 would that display?
I'm trying to get to a position where I can show top 3 and bottom three (which will have negative values) on the same chart.
Irrespective of what sales values you are having my calculation still fulfills your requirement since I've used Index & Last functions which functions based upon largest and lowest values. So, I guess even if your data consists of negative values there should not be any problem.
Paramesh this works perfectly and is very straightforward.
Thanks very much
1 of 1 people found this helpful
Here's a way to show both Top N & Bottom N in a single chart.
Steps to do that:
1. Create a calculated field: [First] with the calculation FIRST()
2. Create another calculated field [Last] with the calculation LAST()
3. Create one more calculated field [Filter Condition] with the calculation
IF ([First] >= -4) OR ([Last] <= 4) THEN "True" ELSE "False" END
4. Add the column [Filter Condition] to the filter shelf and show only "True" values.
Please see the packaged workbook attached.
I know this post is very old so I'm taking a chance!
I think your write up regarding Nested Sorting and Top N per Category via Rank_Unique is almost what I'm in need of.
In my data I have 3 years of sales $'s that also includes the YOY sales $'s. I need to know how I can sort by the top and bottom 5 on the YOY $'s. Is that possible?
I can send my workbook if you can help???