2 Replies Latest reply on Feb 4, 2013 5:41 AM by Dana Withers

    Selected columns comparisson


      Hi, I'm a beginning Tableau user and I can't figure out how to calculate difference between data in the Columns with user being able to select which Columns should be compared. Columns are organized by months with the headcount data and user should be able to select months which he wants to compare. Thanks, Olha

        • 1. Re: Selected columns comparisson
          Joshua Milligan



          I'm not sure exactly what you're looking for.  The first thing I noticed is that your data would be quite a bit easier to work with if it was shaped a little differently.


          In the source, instead of a lot of columns that divide a measure (in your case, by date) like this:


          BRAVO Category SubgroupAug-12Dec-12Jul-121-JunNov-12Oct-12Sep-12
          J&J Reportable1A0100420


          ...Tableau will be easier to work with if the data looks like this:


          BRAVO Category SubgroupDateValue
          J&J Reportable1A8/1/20120
          J&J Reportable1A12/1/20121
          J&J Reportable1A7/1/20120
          J&J Reportable1A6/1/20120
          J&J Reportable1A11/1/20124



          You can find a data reshaping tool here: http://kb.tableausoftware.com/articles/knowledgebase/addin-reshaping-data-excel that will help you reformat the data.


          I've attached a sample of the reshaped data and a packaged workbook with it.  You can see how much easier it is to work with.


          Hopefully that will give us a common frame of reference to work through your specific problem, once you've had a chance to look at the new structure.



          • 2. Re: Selected columns comparisson
            Dana Withers

            Hi Olha,


            I was trying something similar because we have a few reports where users want to compare stuff, so I though I'd give this one a try. I couldn't really follow your version of the data, but tried it with the reshaped dataset that Joshua added.

            I coloured the calculation fields so it is easy to see what the calculation is.

            Is this helpful?