1 Reply Latest reply on Jan 28, 2019 12:39 PM by Ken Flerlage

    Top N and Bottom N


      Hello i need some insight,

      1. I created a Top N and Bottom N filter/parameter because the requirement demands a toggle, but Tableau keeps putting the filter options as a list, but i want then to the side by side.

      2. There are about 12 Job categories when i select Top 10 it gives me Top 10 but when i select bottom 10 it gives me the last 2, is there anyway for me to get the filter to give me bottom 10 as: between the no 2-12 as opposed to just the last 2?

      please find my workbook attached, Dashboard 2 is the Dashboard i am working with.

      my top n calculation: (Top10)

      IF [IDX] <= [Top 10] THEN "TOP10" ELSEIF [IDX]> SIZE()- [Top 10]


        • 1. Re: Top N and Bottom N
          Ken Flerlage

          For # 1, are you saying that you want the parameter options to be side by side rather than one on top of the other? If so, I think you'll need to change the parameter to a single value dropdown.


          For the top/bottom 10, I'd take a different approach than what you're doing. I'd start by creating a parameter called Top or Bottom.

          Then I'd create a calculated field like this:


          Top X Value

          // Allow us to get the top or bottom X for Avg time to fill.

          IF [Top or Bottom]="Top" THEN

              [Avg Time to fill]


              // This will make lower numbers bigger.

              -[Avg Time to fill]



          Then, I'd set up Job Category as a filter as follows:


          Finally, I'd remove the filter on TOP10.


          Then, on your dashboard, change it to use the parameter instead of the filter.


          See attached. Note: I only made the change for the Time to Fill sheet.