Crosstab query

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

For example, you can use crosstab queries to:

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

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

See below Cross-tabulate codes and cases

You can change the values displayed in crosstab query results, and modify their appearance, in order to extract further information from the data Working with the results of a crosstab query.

Before running a crosstab query, you need to:

  • Create cases for the people, places or other entities that are the focus of your analysis Cases
  • Define the demographic attributes of the cases Create case classifications
  • Code your source material at the cases and codes Coding

Cross-tabulate codes and cases

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

On the Explore tab, in the Queries menu, click Crosstab.

Select the Query tab to set query criteria:

Example of Crosstab query criteria.

1 Add codes to the Codes panel—drag and drop from the List View or click the plus sign.

2From Show code against, choose Cases.

3Add cases to the Cases panel—drag and drop from the List View or click the plus sign.

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

5Click Run Query.

NOTES

  • The column totals indicate the total number of references for each case. 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 code. This can help you to see which cases have the most coding across the selected themes.
  • To save the results, click Save Results after running the query. The crosstab results are stored in the Query Results folder under Queries in the Navigation View.
  • Click the Undock icon (in the top right of the Detail View) to open the file in the Detail View into its own window, making more space to work. See Customize the workspace

Cross-tabulate codes and attributes

You can cross-tabulate codes against case attribute values.

On the Explore tab, in the Queries menu, click Crosstab.

Select the Query tab to set query criteria:

Crosstab of codes and case attribute values. 1Add codes to the Codes panel—drag and drop from the List View or click the plus sign.

2From Show code against, choose Attributes.

3Choose the classification for the attributes you want to cross-tabulate and choose one or two attributes. Click Swap 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.

NOTES

  • The column total is the number of unique cases (with selected attributes) that have coding to 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 to 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.
  • To save query settings so you can run a query again later, click Save Criteria. Name the query criteria file and optionally add a description. The file is saved under Queries / Query Criteria in the Navigation View.
  • To save query results click Save Results. Name the results file and optionally add a description. The file is saved under Queries / Query Results in the Navigation View.

Working with the results of a crosstab query

TIP  Click the Expand icon at the top of the Detail View to make more room for reviewing query results. Customize the workspace

Click Results at the top of the crosstab configuration panel to change the way results are displayed:

Changing the display of a Crosstab query.

1 Show results as: Change 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). The options change depending on whether you selected a case or file classification when defining the query.

  • Cases/Files Coded  Displays the number of cases or files with selected attribute values that are coded to the intersecting code. Use this to answer questions like How many females talked about development?
  • Coding References Displays the number of references coded to cases (or files) with selected attribute values and the intersecting code. Use this to answer questions like How often did women mention community?
  • Coding Presence Displays whether there is coding to cases (or files) with selected attribute values and the intersecting codes. When you select this, the cells display Yes or No.

2 Show cell values as: Change the values displayed in the cells—for example, show the percentage of the total value of the column.

  • Count  Displays a count of the cell content.
  • Row Percentage  Displays a percentage of the total value of the row.
  • Column Percentage  Displays a percentage of the total value of the column.

3 Transpose: Swap the columns and rows.

4 Heat map: Apply shading to cells to make it easier to see patterns in the matrix. The colors at the top of the thumbnail are applied to the highest numbers.

5 Table headers: Wrap the text in the column headers.

Other ways to work with crosstab query results:

  • Double-click in a cell to view the coded content.
  • Click the share icon The share icon at the top of the Detail View to export, print or share the crosstab results. You can export the results as a spreadsheet (.csv).