3 Replies Latest reply on Apr 6, 2016 10:52 AM by Daniel Vincent

    Please help - adding averages, please see description below - thank you in advance

    Lucy Jones

      Please help - I have attached some sample data, I need to show the average 'Benefit' by project but then when I roll it up into the organisation I need to add the average of each project. For example when I list the projects I want them to show the average so Project A 500, Project B 300. But when I roll up into organisations I want to add these averages so for example Blue 800.

       

      Please let me know if this is possible - I am using Tableau v8.3.

       

      Thank you so much for your help

        • 1. Re: Please help - adding averages, please see description below - thank you in advance
          Daniel Vincent

          You can add the averages IF that is what is called for.  However, in your example true avg would be 400 for Blue.  Regardless, I'll show you how to get what you're looking for.  It's as simple as doing a two pass total in 8.3.

           

           

          So formatting it as such and turning on subtotals you'll get a true avg of benefits.

          Screen Shot 2016-04-01 at 11.09.32 AM.png

           

          I created a duplicate sheet and from here I changed the total all using Sum instead of Automatic

          Screen Shot 2016-04-01 at 11.09.03 AM.png

           

          Which will give you your results you wanted.

          Screen Shot 2016-04-01 at 11.09.27 AM.png

           

          Attaching 8.3 workbook

          • 2. Re: Please help - adding averages, please see description below - thank you in advance
            Lucy Jones

            Hi Daniel,

             

            Thank you so much for getting back to me. I really appreciate your help.

             

            This isnt quite what I need and it is probably my fault for not explaining. I need to show the organisation results without the project listed next to it. Sometimes it is hard to explain in writing but what I need to show is the organisation with the sum of the average projects next to it. So Blue 800. This is only a small snapshot of data, we have multiple projects with a number of people working on each one, we need to show total project benefits by organisation but we cannot duplicate benefits so we only want to show one lot of benefits for project A, B etc. Does this make sense?

             

            Thanks again for your help, you are a lifesaver.

             

            Lucy

            • 3. Re: Please help - adding averages, please see description below - thank you in advance
              Daniel Vincent

              Sorry for the delay.  I'm not on the forums as much as I'd like.

               

              But you can easily get to what you want to show.  Put org on your row shelf, project on details, then create this calc:  window_sum(avg([Benefits])) and throw it on your viz.

              Which will give you something like this:

              Screen Shot 2016-04-06 at 12.47.56 PM.png

              Next create an index calc:  index() and put this on your filter shelf.  You'll have the index compute using project.  The next box you'll select 1 so it only shows the first repeated value.

              Screen Shot 2016-04-06 at 12.49.51 PM.pngScreen Shot 2016-04-06 at 12.50.01 PM.png

               

              Now you'll have what you're looking for.

              Screen Shot 2016-04-06 at 12.51.16 PM.png

              Attaching 8.3 workbook