6 Replies Latest reply: Jan 11, 2016 5:13 AM by Sangram Reddy RSS

    map values to survey answers

      Hello,

       

      new to Qlik Sense, I'm trying to visualize survey data (likert) with a range of Strongly agree to Strongly disagree (1-5) and calculating a weighted mean accounting for the number of responses in each. But I'm having trouble assigning values to the answers?

       

      this is an example of what I'm trying to accomplish:

       

       

      Strongly Agree = 5 -- 10 responses

      Agree = 4 -- 8 responses

      Disagree = 3 --  5 responses

      Strongly Disagree = 2 -- 4 responses

      Not Applicable = 1 -- 5 responses

       

      I **think I have to create a new field..but not sure how or where..(INLINE??), then after that use that field to sort by value, and use a weighted formula....but once again, kind of lost and overwhelmed!

       

      many thanks

        • Re: map values to survey answers
          Gysbert Wassenaar

          I'm afraid I don't understand your explanation. How come the intervals overlap?

               Not applicable 1--5

               Strongly Disagree 2--4

           

          Perhaps you can post a small qlikview document that illustrates the question.

          • Re: map values to survey answers
            prabhu appu

            Hi Adrian,

             

            Inline table is one of the easy solution. Go to the data load editor (script editor) and add the below code

             

            Load * Inline [

            Response, Value

            Strongly Agree, 1

            Agree, 2

            Disagree, 3

            Strongly Disagree, 4

            Not Applicable, 5

            ];

             

            Make sure the column name is same as per your existing data model. So it will automatically linked with corresponding column. Also you can load this from external files like csv, Excel.

             

            Regards,

            Prabhu Appu

            • Re: map values to survey answers
              Sangram Reddy

              Hi Adrian,

               

              Try this:

               

               

              Capture.png

              Say you have a table with the surveys like this:

               

               

               

              Dim:

              Mapping load * inline [

              Rating,Description

              1,Not Applicable

              2,Strongly Disagree

              3,Disagree

              4,Agree

              5,Strongly Agree

              ];

               

               

              Tempdata:

              load Rating,

                applymap('Dim',Rating,null()) as Description,

                Response;

              Load Rating,count(Rating) as Response

                   group by Rating;

              load * inline [

              Customer, Rating

              A,5

              B,2

              C,3

              D,4

              E,5

              F,5

              G,3

              H,5

              I,4

              J,1

              ];

               

               

              NoConcatenate

              [Data]:

              Load * Resident Tempdata order by Rating desc;

               

              Thanks and Regards,

              Sangram Reddy.

                • Re: map values to survey answers

                  this is a little complex I'll go through it and try to understand it a bit.

                   

                  to be a little more clear on the responses/intervals.

                   

                  e.g. one survey question is "The instructor is clear and concise."

                   

                  in that question, there were:

                   

                  10 people that chose Strongly Agree

                  Agree - 8

                  Disagree -  5

                  Strongly Disagree - 4

                  Not Applicable - 5

                   

                  etc..

                   

                  I want to be able to come up with a mean score for that question.