The Rows or Columns of a Grid are Blank or Messy

From Q
Jump to: navigation, search

When the rows or columns of a Grid question are blank or messy this is generally due to the data not being set up correctly (see surveyanalysis.org for more information).

Related Online Training modules
Poorly Set Up Grids
Generally it is best to access online training from within Q by selecting Help > Online Training

Solutions

Re-exporting the data file

Where the data file has been generated by 'hand' (i.e., by a DP professional rather than automatically created by an online data collection program), it is often appropriate to get the data file to be re-generated, drawing particular attention to the instructions for Looped questions and grids in the SPSS Data File Specifications. A particular benefit of this approach is that all the other solutions require some guesses to be made about the nature of an error, whereas this approach assigns the fixing of the problem to the person that has the most information at hand as to the true cause of the problem.

Manually entering the labels on the Outputs Tab

Right-click on blank categories in the Outputs Tab, select Rename and enter the correct labels.

Fixing the labels in the Variables and Questions tab

  1. Select all the variables in the question in the Variables and Questions tab, right-click and select Revert to Source.
  2. Manually alter the labels in the Variables and Questions tab. Where the grid is large it can be useful to copy and paste the labels into Excel, tidy them in Excel and then copy and paste back into Q (by right-clicking and selecting Paste Labels).
  3. Select all the variables, right-click and select Set Question.

Re-ordering variables

  1. Select all the variables in the question in the Variables and Questions tab, right-click and select Revert to Source.
  2. Click on the row numbers in Variables and Questions tab and manually move, or, select all the rows and use Sort by.
  3. Select all the variables, right-click and select Set Question.

Creating dummy variables

Where there are missing variables (e.g., because a specific attribute was not asked for a brand), a solution is to:

  1. Select all the variables in the question in the Variables and Questions tab, right-click and select Revert to Source.
  2. Right-click where you need to insert a new variable (i.e., a dummy variable).
  3. Select Insert Variable(s) > JavaScript Formula > Numeric.
  4. Enter in an Expression of NaN and press OK.
  5. Copy and paste the label from another cell and modify accordingly.
  6. Select all the variables, right-click and select Set Question.

See also

The Data is a Mess When I Open Q