5 Replies Latest reply on Aug 13, 2018 1:15 PM by Hari Ankem

    Tableau Calculations with Survey Data

    Zahra Dabzadeh

      Hello Friends,

       

      Please see the structure of my data below, which I am NOT able to change. Just as context, this data is collected through a survey that has been conducted for multiple years at the institutional and national level!

       

      Institution ID

      Year

      Question Text

      Variable Name

      Rating

      Calculation

      Data

      100

      2017

      Quality of Service

      QUALI_1

      Satisfied

      Percent

      33.33

      100

      2017

      Quality of Service

      QUALI_2

      Neutral

      Percent

      33.33

      100

      2017

      Quality of Service

      QUALI_3

      Not Satisfied

      Percent

      33.33

      100

      2016

      Quality of Service

      QUALI_1

      Satisfied

      Percent

      66.66

      100

      2016

      Quality of Service

      QUALI_2

      Neutral

      Percent

      0

      100

      2016

      Quality of Service

      QUALI_3

      Not Satisfied

      Percent

      3.33

      100

      2015

      Quality of Service

      QUALI_1

      Satisfied

      Percent

      25

      100

      2015

      Quality of Service

      QUALI_2

      Neutral

      Percent

      50

      100

      2015

      Quality of Service

      QUALI_3

      Not Satisfied

      Percent

      25

      100

      2017

      Accessibility of Representatives

      ACCESS_1

      Agree

      Percent

      50

      100

      2017

      Accessibility of Representatives

      ACCESS_2

      Neutral

      Percent

      25

      100

      2017

      Accessibility of Representatives

      ACCESS_3

      Disagree

      Percent

      25

      100

      2016

      Accessibility of Representatives

      ACCESS_1

      Agree

      Percent

      33.33

      100

      2016

      Accessibility of Representatives

      ACCESS_2

      Neutral

      Percent

      66.66

      100

      2016

      Accessibility of Representatives

      ACCESS_3

      Disagree

      Percent

      33.33

      100

      2015

      Accessibility of Representatives

      ACCESS_1

      Agree

      Percent

      25

      100

      2015

      Accessibility of Representatives

      ACCESS_2

      Neutral

      Percent

      25

      100

      2015

      Accessibility of Representatives

      ACCESS_3

      Disagree

      Percent

      50

      200

      2017

      Quality of Service

      QUALI_1

      Satisfied

      Percent

      75

      200

      2017

      Quality of Service

      QUALI_2

      Neutral

      Percent

      25

      200

      2017

      Quality of Service

      QUALI_3

      Not Satisfied

      Percent

      0

      200

      2016

      Quality of Service

      QUALI_1

      Satisfied

      Percent

      40

      200

      2016

      Quality of Service

      QUALI_2

      Neutral

      Percent

      40

      200

      2016

      Quality of Service

      QUALI_3

      Not Satisfied

      Percent

      20

      200

      2015

      Quality of Service

      QUALI_1

      Satisfied

      Percent

      20

      200

      2015

      Quality of Service

      QUALI_2

      Neutral

      Percent

      20

      200

      2015

      Quality of Service

      QUALI_3

      Not Satisfied

      Percent

      60

      200

      2017

      Accessibility of Representatives

      ACCESS_1

      Agree

      Percent

      50

      200

      2017

      Accessibility of Representatives

      ACCESS_2

      Neutral

      Percent

      25

      200

      2017

      Accessibility of Representatives

      ACCESS_3

      Disagree

      Percent

      25

      200

      2016

      Accessibility of Representatives

      ACCESS_1

      Agree

      Percent

      33.33

      200

      2016

      Accessibility of Representatives

      ACCESS_2

      Neutral

      Percent

      33.33

      200

      2016

      Accessibility of Representatives

      ACCESS_3

      Disagree

      Percent

      33.33

      200

      2015

      Accessibility of Representatives

      ACCESS_1

      Agree

      Percent

      25

      200

      2015

      Accessibility of Representatives

      ACCESS_2

      Neutral

      Percent

      50

      200

      2015

      Accessibility of Representatives

      ACCESS_3

      Disagree

      Percent

      25

       

      What I am trying to calculate in Tableau is the following:

       

      For each question responded to for the institution with the ID of 100, the difference between the (SUM of “Agree” & “Neutral”) during 2017 and the (SUM of “Agree” & Neutral”) during 2016.

       

      For each question, the difference between the (SUM of “Agree” & “Neutral”) during 2017 for the institution with the ID of 100 and the (SUM of “Agree” & “Neutral”) during 2017 for the institution with the ID of 200.

       

      Seems simple enough... But in this moment, I feel completely helpless and am very confused about how to go about these calculations in Tableau...

       

      Any direction or thoughts would be deeply appreciated!

        • 1. Re: Tableau Calculations with Survey Data
          Hari Ankem

          Can you provide your expected output and format?

          • 2. Re: Tableau Calculations with Survey Data
            Zahra Dabzadeh

            Hi Hari!

             

            Thanks for your willingness to help!

             

            Here is my ideal output for each question:

             

            2015

            2016

            2017

            Question 1

            Question 2

            SUM of “Neutral” and Satisfied”/”Agree” for the institution with the ID of 100

            SUM of “Neutral” and “Satisfied”/”Agree” for the institution with the ID of 100

            SUM of “Neutral” and “Satisfied”/”Agree” for the institution with the ID of 100

            For each question responded to for the institution with the ID of 100, the difference between the (SUM of “Satisfied”/Agree” & “Neutral”) during 2017 and the (SUM of “Satisfied”/Agree” & Neutral”) during 2016.

            For each question, the difference between the (SUM of “Satisfied”/Agree” & “Neutral”) during 2017 for the institution with the ID of 100 and the (SUM of “Satisfied”/Agree” & “Neutral”) during 2017 for the institution with the ID of 200.

            • 3. Re: Tableau Calculations with Survey Data
              Hari Ankem

              Guess this is what you are looking for.

              1.png

               

              The workbook is attached and you can look into the individual formulas and modify if required. Hope this helps.

              • 4. Re: Tableau Calculations with Survey Data
                Zahra Dabzadeh

                Hi Hari!

                 

                Sorry for not getting back to you on this earlier... This project was put on the back burner almost as soon as I posted my question on here, and I have only just got around to taking a closer look at your workbook.

                 

                Thank you SO MUCH for your workbook!!! It is absolutely what I was looking for

                 

                I intend to spend some time to figure out the approach/logic you used to put together these calculations in such a streamlined way! I hope you don't mind if I bug you with some questions on this in the future.

                 

                Many thanks again! I hope that I am one day at the same level with my Tableau skills as you are, and can return the favor by perhaps answering a question of yours or paying it forward and being a complete and utter life saver for another newbie as you have been for me!