2 Replies Latest reply on Jul 22, 2018 2:05 AM by Ritesh Bisht

    How to create a User controlled Top N parameter slider

    Anjali Sn

      Hi,

       

      I have a csv datasource of Olympic medal winners. I'm trying to create a top N slider, such that if say top 10 is selected, then it only shows the all time top 10 player names from each country. The Medal_Count calculated field calculates the total medal count weight (where a gold medal is given a 100 weight, silver is given 50 & bronze is given 25).

       

      Can anyone please help me why the Top N slider is not working?? The sample workbook is attached.

        • 1. Re: How to create a User controlled Top N parameter slider
          Naveen B

          Hi Anjali,

           

          Could you please attach the .twbx instead of .twb while opening your workbook its throwing error so that it will be possible to help

           

           

          BR,

          NB

          • 2. Re: How to create a User controlled Top N parameter slider
            Ritesh Bisht

            Hi Anjali,

             

             

            Suppose below is your data-source and I need a filter which can select Top N (Top 2)

            Screen Shot 2018-07-22 at 2.14.51 PM.png

             

             

            This should be the desired output. (B and D from India , A & E from USA )---->Top 2 players where a gold medal is given a 100 weight, silver is given 50 & bronze is given 25

             

            Screen Shot 2018-07-22 at 2.16.16 PM.png

             

             

            STEP 1

             

            Screen Shot 2018-07-22 at 2.19.29 PM.png

             

             

             

            STEP 2

             

            Screen Shot 2018-07-22 at 2.20.02 PM.png

             

             

             

             

            STEP 3

             

             

            Drag above to rows but do take care of Compute Using since we need to move along Players and Keep country as a partitionScreen Shot 2018-07-22 at 2.20.44 PM.png

             

             

            STEP 4

             

            Turn rank to continuous and set the Filter as required. (In your case 1-10 )

             

            Screen Shot 2018-07-22 at 2.22.51 PM.png

             

             

             

            STEP 5

             

            Show as filter and your slider filter is ready .

             

            Screen Shot 2018-07-22 at 2.24.05 PM.png

             

             

             

            I am guessing that you might have used TOP N approach but then kindly keep in mind that

             

            ----->TOP N will be filtered first at table level and not country level so you might not be seeing the desirable result there.

             

            So, when you select Top 5 it will be mixing both the countries.

             

            NOTE: If you have a filter for the country as well then you can make use of CONTEXT filter but I think  that you are not doing that , I have posted my article on a similar situation here -->  Order of Operations

             

            Please find the attached sheet as well. All the best !

             

            Please set this as CORRECT/HELPFUL so that it can help others as well.

             

            Thanks,

            Ritesh