3 Replies Latest reply on Jan 7, 2014 6:47 AM by Jim Wahl

    Top 'n' based on dimension?

    Dheeraj Poojari

      I have a table in the below format. The 3 columns that I am interested in, are Content ID(Column E), Page Views(Column G) and Content Name(Column O).


      1-6-2014 11-01-35 PM.png

      When I create a dashboard using the below format, I get two sets of results.

      1-6-2014 10-59-36 PM.png


      My query is, can I filter the Content Name to show only  the Top 1 instance of Page views, based on Content ID? I have many content IDS and content names. So when I manually use the filter option on content name, it gives me the Top 1 instance between all rows of data. Can I use a row specific or column specific filter?


      Not sure if my query is understandable, so please let me know.Jim Wahl

        • 1. Re: Top 'n' based on dimension?
          Jim Wahl

          Hi Dheeraj,


          You could create a calculated field:

          Top Content ID Only =

          RANK(SUM(Page Views)) == 1


          When entering the formula, click on the blue "Default Table Calculation" text in the upper right of the Calculated Field dialog box and select Content ID. Rank (introduced in 8.1) is better than INDEX()---with INDEX() you have to worry about sort order of the Contend ID field.


          Now you can drag this to the Filter pane and select True.



          • 2. Re: Top 'n' based on dimension?
            Dheeraj Poojari

            Hi Jim,


            Many thanks for always responding with solutions ☺


            I cannot use 8.1 since our organization needs to update Tableau Server from v8 to v8.1, hence I cannot use Tableau Desktop v8. Any workaround for Rank formula?









            This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and any disclosure, copying, or distribution of this message, or the taking of any action based on it, by you is strictly prohibited.



            • 3. Re: Top 'n' based on dimension?
              Jim Wahl

              Yes, you can replace RANK(SUM(Page Views)) with INDEX()


              When you click on "Default Table Calculation" select Advanced instead of Content ID. In the advanced dialog, move Content ID over the the right, Addressing window (same as compute using). On the bottom of this dialog there's a Sort section. Select Page Visits ...