Getting column totals in a semantic differential question with 20 rows

0

I need to get column totals for a semantic differential question with 20 rows. The goal is by counting the totals per column, I can assign 1 of 4 personality categories that I have made.

Is this possible with e.g. scripting? I have my question fully ready, with reporting values set 1-4 for each of the 4 ‘options’ on each row. See screenshot:

 

IS answered
    0
    IS 2.20K Rep.

    It is certainly possible with a custom scripting action on a following page.

    See the Grid Questions section of this page: https://script.surveygizmo.com/help/sgapigetvalue

    I have had problems posting code to this forum in the past, so I am not sure what it will look like, but the following is some modified code I used to do something similar, that might get you started. Also note that this forum changes quotes to smart quotes, so if you copy and paste, you will need to type over all quote characters (‘ ‘) to replace them with straight single quote characters.

    %%qsum = 0;
    %%nullcount = 0;

    %%questionid = 2;
    foreach (sgapiGetValue(%%questionid) as %%rowid => %%rowarray){
    foreach (%%rowarray as %%optionsku => %%reportingvalue){
    if (!sgapiIs_Null(%%reportingvalue)){
    %%qsum = %%qsum + %%reportingvalue;
    } else {
    %%nullcount = %%nullcount + 1;
    }
    }
    }

    if(%%nullcount = 0) {
    %%output .= ‘Your total score was ‘. %%qsum . ‘<br>’;
    } else {
    %%output .= ‘Your did not answer all of the questions, so ‘;
    %%output .= ‘your score cannot be calculated<br>’;
    }

    IS edited answer
      ×

      Login

      Question stats

      • Active
      • Views534 times
      • Answers1 answer
      • Followers1 follower