9 Replies Latest reply on Dec 3, 2016 11:56 AM by Irfan Ahamad

    Index Function

    Irfan Ahamad

      Is there option to show the index number for each row?

        • 1. Re: Index Function
          Rekha Kesavan

          Hello Irfan,


          Can you add a screen shot as i am not able to open your workbook due to version.

          I am just attempting to show that Index is a Table calculation which can created using Calculated filed and used to display.





          • 2. Re: Index Function
            Joe Oppelt

            Irfan -- Are you on 10.1?  I guess I need to get the next version installed...


            In the attached superstore example (8.2, so it will upgrade to any version) I made a simple chart and added an INDEX calc to the display to demonstrate what Rekha suggested.


            Sheet 1 has the index running TABLE(across).


            Sheet 2 has it running TABLE(down).


            Sheet 3 has it running TABLE(across then down).


            Sheet 4 has it running along specified dimensions (region, category, and then Year, in that order.)


            Sheet 5 has it running along the same dimensions, but restarting for every REGION.


            This is a powerful table calc function for you to use, especially if you get adept at telling it how to "walk" through your table.

            • 3. Re: Index Function
              Jonathan Drummey

              Hi Irfan,


              Here's a drastically simplified view and with that the default table calculation compute using of Table (Down) will work:



              Screen Shot 2016-11-29 at 3.06.30 PM.png


              There's no need for the multiple axis crosstab trick to get Customer Name listed instead that's on Rows, to get rid of the Abc's I used a Polygon mark type and removed the Column border for Pane.


              v10.1 workbook is attached.



              • 4. Re: Index Function
                Irfan Ahamad

                Hi Jonathan,


                Thanks a lot for your quick reply, Actually I have used multiple axis because my boss wants customers name in colors according to the region. Is there any option to get index number in the same format which I used?

                • 5. Re: Index Function
                  Irfan Ahamad

                  I need index number for rows in the same format. Is there any option in tableau ?


                  Please go thru the attachment.




                  • 6. Re: Index Function
                    Joe Oppelt

                    (Note to self: V9.3 workbook)


                    Like this?  See Sheet 2 in the attached.

                    • 7. Re: Index Function
                      Irfan Ahamad

                      Hi Joe,


                      Thanks a lot for your reply, It is working but you have removed dual axis functionality due this I am unable to put the header name.


                      Can you please suggest me how I can put the header for the column-


                      • 8. Re: Index Function
                        Joe Oppelt

                        The problem with dual axis is that you can box yourself in with functionality.  It's a powerful feature, and (in my opinion) the power of dual axis is being wasted simply to add a label.  I have found myself working on sheets that need dual axis for something more important, but it's already a dual axis sheet, so leveraging that feature isn't available to me.


                        Take a look at the attached.


                        In the dashboard I put the Sheet 2 I did for you, and then I floated a text box over it to add the label.


                        In Sheet 3 I created another dimension calc with nothing but a blank in it.  I called it [Region ]  I added it to the sheet as a column, and it's header looks like the column label for the regions.  Yes, there is an empty region on the sheet where the blank value is displayed.  You can format that out of there.  Users won't know the difference.

                        So that's two ways to address your need.

                        But if you must have dual axis, I just modified the index calc on sheet 1 to the same settings as they are on sheets 2 and 3.

                        • 9. Re: Index Function
                          Irfan Ahamad

                          Thanks a lot Joe.