Queries > Crosstab query

Crosstab query

Crosstab queries give you a quick way to check the spread of coding across cases and demographic variables.

For example, you could use a Crosstab query to:

  • Check how often interview respondents refer to a particular topic or issue

Crosstab results showing how often respondents refer to a particular theme.

  • Compare what different demographic groups have said about a theme

Crosstab results showing what different demographic groups have said about a theme.

Before running a Crosstab query, you need to:

  • Create cases for the people, places or other entities that are the focus of your analysis
  • Define the demographic attributes of the cases
  • Code your source material at the cases and at theme nodes

Cross tabulate codes and cases

You can use a Crosstab query to check the spread of coding across the cases in your project.

To get started - on the Explore tab, in the Query group, click Crosstab.

Then, specify the query criteria:

Example of Crosstab query criteria.

1From Crosstab codes against, choose Cases.

2Add theme nodes to the Codes panel, drag and drop them from list view or click the plus sign.

3Add cases to the Cases panel, drag and drop them from list view or click the plus sign.

4To limit the scope of the query, choose Selected Items or Selected Folders. For example, you could search only the files in your Interviews folder.

5Click Run Query. You can click the arrow to automatically save the results or you can click Save Results after running the query.

The Crosstab results are displayed:

NOTES

  • The column totals indicate the total number of references for each node. This is a useful way to determine the dominant or less dominant themes.
  • The row totals indicate the total number of coding references for each case. This can help you to see which cases have the most coding across the selected themes.
  • Click the Chart tab on the right of the query results to display the results in a chart.
  • To save the query criteria (so you can run the query again), click Add to Project at the top of the crosstab criteria.
  • To save the results, click Save Results after running the query. The crosstab is stored in the Query Results folder under Search in Navigation View.

Cross tabulate codes and attributes

You can cross tabulate codes against the attribute values of your cases.

To get started - on the Explore tab, in the Query group, click Crosstab.

Then, specify the query criteria:

Crosstab of codes and case attribute values.

1From Crosstab codes against, choose Attributes.

2Add theme nodes to the Codes panel, drag and drop them from list view or click the plus sign.

3Choose the classification for the attributes you want to cross-tabulate and choose one or two attributes. Use the arrows to reorder the attributes.

4To limit the scope of the query, choose Selected Items or Selected Folders. For example, you could search only the files in your Interviews folder.

5Click Run Query. You can click the arrow to automatically save the results or you can click Save Results after running the query.

The Crosstab results are displayed.

NOTES

  • The column total is the number of unique cases (with selected attributes) that have coding at the themes. This is a useful way to see which group has the most coding across the themes.
  • The row total indicates the number of cases that have coding at the theme (out of all the cases represented in the crosstab). This can give you a feel for the dominant themes across the selected population.
  • Click the Chart tab on the right of the query results to display the results in a chart.
  • To save the criteria (so you can run the query again), click Add to Project on the top right of the crosstab criteria.
  • To save the results, click Save Results after running the query. The crosstab is stored in the Query Results folder under Search in Navigation View.

Working with the results of a Crosstab query

Use the Crosstab ribbon to change the way results are displayed:

Using the Crosstab ribbon to change the display.

1Apply shading to cells to make it easier to see patterns in the matrix.

2Change the content displayed in the cells—for example, Cases Coded (the number of cases with particular attributes who mention a theme) or Coding References (how many times cases with particular attributes mention a theme).

3Change the values displayed in the cells—for example, show the percentage of the total value of the column.

4Run the query and choose to save the results in the Query Results folder.

5Swap the columns and rows or sort a selected column. Reset Settings to return to the original layout.

6Wrap the text in the column headers or display the headers horizontally.

7Display simple node names or include the hierarchical location.

Other ways to work with Crosstab query results:

  • Double-click in a cell to review the coded content.
  • To chart the results, click the Chart tab on the right of Detail View.
  • To export the results, on the Share tab, in the Export group, click Export.You can export the crosstab as a spreadsheet (.csv) or as an SPSS Data File (.sav).