Want to Learn Table Calculations? Here’s How!

Going beyond Tableau’s built-in Quick Table Calculations can be challenging, and help you progress along the path of the Tableau Jedi. I’ve been sharing these links about table calculations a lot via email, here’s an annotated post of them:

Beginner

http://www.theinformationlab.co.uk/2011/09/23/blue-things-and-green-things/ – Great intro by Tom Brown.
http://community.tableausoftware.com/message/184716#184716 – Joe Mako’s intro to Table Calculations from Think Data Thursday.
http://www.tableausoftware.com/learn/tutorials/on-demand/table-calculations – Tableau On-Demand training video
http://kb.tableausoftware.com/articles/knowledgebase/table-calculations – Really basic partitioning
http://www.thedatastudio.co.uk/blog/the-data-studio-blog/groundwork-for-custom-table-calculations – Another introduction, by Joe Mako.
http://community.tableausoftware.com/thread/144622 – Think Data Thursday talk on Setting up for Table Calculation Success by yours truly.
http://www.tableausoftware.com/table-calculations – Rebuild the 10 workbooks on this page yourself and you’ll have a decent foundation.
http://www.tableausoftware.com/sites/default/files/pages/table_calcs_in_tableau_6.pdf – A good introduction to what’s happening underneath the surface of table calculations.
http://onlinehelp.tableausoftware.com/current/pro/online/en-us/calculations_tablecalculations.html – RTM? Why not? This material is almost entirely covered by the above links, and at the same time learning table calculations is kind of like understanding the theory of relativity, or the narrative of Infinite Jest – continued study is rewarding.

Intermediate

http://www.clearlyandsimply.com/clearly_and_simply/2011/01/another-look-at-site-catchment-analysis-with-tableau-6-part-3.html – Richard Leeke’s awesome tutorial on tuning table calculation performance.  (The part about ,IIF(FIRST()==0,LAST(),0) is no longer needed as of Tableau version 8 and beyond [Added 2013-09-24]).
http://community.tableausoftware.com/message/139603#139603 – Still the post on order of filter application, by Joe Mako.
http://drawingwithnumbers.artisart.org/customizing-grand-totals-part-2 – A contribution by yours truly about aggregations, table calculations and grand totals.
http://drawingwithnumbers.artisart.org/the-next-n-table-calculation/ – A sequel to the top 10 table calculations with a number of other useful examples. [Added 2013-09-24]
http://redheadedstepdata.io/nested-table-calc-anatomy/ – great review of how to put together more advanced table calcs

Advanced

http://drawingwithnumbers.artisart.org/at-the-level-unlocking-the-mystery-part-1-ordinal-calcs/ – At the Level for ordinal calcs
In these links, look for the posts by Ross Bunker, a Tableau developer responsible for a lot of what we use in table calculations:
http://community.tableausoftware.com/thread/108290 – A long thread from late 2010 on table calculations, though not all of it is applicable now, the discussion goes in many interesting directions.
http://community.tableausoftware.com/thread/117817 – A great thread on understanding “At the level” and “Restarting every”
http://community.tableausoftware.com/thread/119179 – more on partitioning and “At the level”

Have any suggestions? Add them in the comments!

12 thoughts on “Want to Learn Table Calculations? Here’s How!

  1. Shawn Wallwork

    Jonathan thanks for this! I just spent the day beating my head against the proverbial table calculation table. Arrrguh! The only good that came out of it is I now have a vague idea of how ‘Advanced’ works. Once the fog clears in me head, I’ll start digging through your list. Someday it’ll finally make sense, I hope. Thanks again,

    –Shawn

    Reply
    1. Joe Mako

      Shawn, here is the quick run down of the Advanced edit table calc dialog:

      – Only use Advanced in two conditions: need a sort different from the pill, or need to address on multiple dimensions.
      – When placing multiple dimensions on the compute using list, Tableau is effectively creating a Set, like a string concatenation of those dimension pills.
      – Automatic Sort will use default sort in descending order of the dimensions
      – Using order along will sort the Set, the concatenation of those dimension pills
      – The order of the dimensions in the Compute using list sets your options for Restarting every and At the level
      – Use Restarting every to get nested sorting, to apply partitioning after sorting.
      – Use At the level to set when the Index will increment, be aware that the sort is coming from the Set
      – The options in Restarting are not redundant, while the options in At the level are redundant, Selecting Deepest and the bottom dimension are the same thing.
      – For At the level, the selected dimensions and all dimensions above it in the list will impact when Index increments, while a change in the dimensions below will not cause an increment, again, very important to realize that the sort is coming from the Set, the concatenation of all dimensions used for compute using above and below. It may feel like you are telling Tableau to ignore the dimensions below, but it is not ignoring them for sorting, it is only ignoring the dimensions below for incrementing.

      Please contact me if you have any questions.

      Reply
      1. Jonathan Drummey Post author

        Hi Joe,

        This is a great description of At the Level and Restarting Every, thanks for posting. One thing that I run into when explaining table calcs to people is that partitioning is easier for them to grasp than addressing, so a complement to “…or need to address on multiple dimensions.” would be something like “…or need to partition on a subset of the dimensions of the view and therefore must address on two or more dimensions.”

        Shawn (or anyone else reading along), an example of this from Superstore Sales would be to have Category, Sub-Category, and Product Name in the view. If you want to generate a value for each combination of those values, but partition only on Category, then you’d set up the Advanced Compute Using to address on Sub-Category and Product.

        Jonathan

        Reply
        1. Siraj Samsudeen

          Hi Jonathan, in the video of Joe Mako on table calculations, the audio and the video seem to be out of sync. The video is moving forward while there is a lag in audio – I have tried it with 2 different browsers and the problem persists. Is this happening only to me? He is covering lot of really nice stuff on table calculations and it is a pity that I can’t really follow what he is saying.

          Reply
  2. Pingback: A Virtual Orrery in Tableau | Drawing with Numbers

  3. Pingback: At the Level – Unlocking the Mystery Part 1: Ordinal Calcs | Drawing with Numbers

  4. Pingback: Tableau Request Live – The 1st Run: User Retention Problem | mluttonbi

  5. lakka kishore

    plz send the videos about on real time project about on tableau in nested table and small multiple table videos also

    Reply
    1. Jonathan Drummey Post author

      Hi, I don’t host any videos on my site, and I’m not sure exactly what you mean by “real time project” or “nested table”. As for small multiple table videos, I don’t know of any. The three places with the most Tableau how-to videos that I know of are: The Tableau on-demand training at http://www.tableausoftware.com/learn/training, the Tableau forums Think Data Thursday series at http://community.tableausoftware.com/groups/think-data-thursday, and Matt Lutton’s Tableau Request Live series at http://mluttonbi.wordpress.com.

      Reply
  6. Pingback: Tableau Tips,Tricks,Best Practices - Calculation - Jenny (Xiao) Zhang

  7. Pingback: At the Level – Unlocking the Mystery Part 2: Rank Functions | Drawing with Numbers

Leave a Reply to Jonathan Drummey Cancel reply