3 Replies Latest reply on Mar 1, 2016 11:27 AM by patrick.byrne.0

    Can you do a calculation with a combined field?

    Lauren Brown

      I am creating a dashboard for survey results.  The first question is about which locations our interns saw patients this semester.  We have overall health centers, which would be considered Hub sites, and then spoke sites.  I created a combined field in order to show the spoke site, hub for each as shown below in order to sort by rank of spoke site for each hub.

       

      I'm very happy with those results.  However, I also want to be able to look at the Hub site (or overall health center) individually.  When I try to do this, as just Health Center, I get results, but it shows only the results for Health center (i.e. only Seneca Falls Health Center, not all the spoke sites for Seneca Falls adding up to create a count for the Hub of Seneca Falls).  I've included another picture of this below.

      I have found several ways to work around this issue, but none are great.  I'm sure there is a simple solution but this has been driving me nuts this morning!  If I bring 'location' (which corresponds to the spoke site) to the color shelf, then it creates the correct graph (with way too many colors).  Additionally, I can bring 'location' (or 'spoke site, hub' combined field) to the detail shelf, but I don't like how it concatenates the view when you hover over the graph in the dashboard.

       

      Is there a way to either do a calculation with the combined field (spoke site, hub) or another way to somehow get the graph that I am looking for, which is having all the spoke sites adding up to create an overall count for the hub/health center?

        • 1. Re: Can you do a calculation with a combined field?
          patrick.byrne.0

          Lauren,

          From what I understand the question is how to create the viz that will show a total count for interns working at Spoke Sites rolling up into Health Center. Currently the viz is calculating the fields ask expected and the counts are displaying discrepancies as shown in the second screen shot. I believe there might be something with the way these calculations are being utilized and the underlying structure of the data that is causing this unexpected result to be returned. Is there any chance that you could post a packaged workbook? OR Possibly some screen shots of the calculations being utilized that is creating the unexpected results?

           

           

          + A sample packaged workbook (.twbx). If the data is confidential, a sample packaged workbook with sample data that mimics the structure of the original workbook is sufficient. Instructions for creating and sending a packaged workbook can be found at the following link:

          http://kb.tableausoftware.com/articles/knowledgebase/sending-packaged-workbook

           

           

          Cheers,

          Patrick

          • 2. Re: Can you do a calculation with a combined field?
            Lauren Brown

            Hi Patrick,

             

            I actually figured out the answer to my own question by playing around and searching around the forums.

             

            What I ended up doing (for anyone who cares) is creating a calculation which I called Hub Total

             

            { INCLUDE [Spoke Site]: [Count]}.

             

            From my understanding, this is a level of detail issue.  By using the Hub Total, it includes the Spoke Site towards the count for the overall Health Center (which is exactly what I was looking for).  It worked perfectly!!

            1 of 1 people found this helpful
            • 3. Re: Can you do a calculation with a combined field?
              patrick.byrne.0

              Excellent! This is what I was actually going to suggest to you! Hence the request to see how the calculations were being used. I am glad that this was cleared up for you and apologies for not reaching out sooner!

               

              Cheers,

              Patrick