Coding Matrix Query
What is a Coding Matrix Query?
A Coding Matrix Query finds all text that meets conditions between two codes - such as “text coded at Code A AND Code B” or “text coded at Code X but NOT Code Y”. You provide a list of codes to use for the rows, and another for the columns, alongside specifying whether to use AND/OR/NOT condition between the two.
Creating a Coding Matrix Query
OK, lets first create a coding matrix query that finds text coded at both the thematic codes and our organisation codes.
To make it feasible to go through the examples within the time available for the training session we are going to ‘Autocoded (Theme)’ rather than spend time doing manual coding. I have included a “warning” note at the top of the folder setting out important limitations with thematic autocoding. In practice, you will want to use orgnaisation codes with your own manual thematic coding.
First, we need to ensure we have some initial coding for the organisation codes. To quickly set this up, we can view what is coded to some of our existing thematic codes and code bits of them to our organisation codes as well. As this is just for purposes of creating coding to work with, don’t worry about this being rigorous -
- Select two or three existing codes from the top-level Codes folder or ‘Autocoded (Theme)’ sub-folder.
- Open tabs to view the code results for the 2-3 you have selected.
- Quickly go through coding sections from the code results to ‘Example’, ‘Gold’, and ‘Unsure’.
OK, now that we have text coded at both our thematic codes and organisation codes, we can now create a coding matrix.
- Go to the Query Criteria folder
- Right-click and select New Query
- and, Matrix Coding Query

Then within the Matrix Coding Query:
- Hit the ‘+’ button.
- Click ‘Select Items…’

Within the ‘Select Project Items’ dialogue, select the three codes you picked:
- Navigate to the folder containing them.
- Check the boxes for them.
- Hit the ‘OK’ button.

Repeat steps for the Columns with our organisation codes:
- Hit the ‘+’ button.
- Click ‘Select Items…’

Then:
- Select Codes.
- Expand the parent z - org code. (or name you chose for it)
- Tick the boxes for the three organisation codes.
- Hit the ‘OK’ button.

Finally:
- Hit ‘Run Query’

Remember to also -
- Hit ‘Save Criteria…’
- Provide a suitable name.

This will then produce a coding matrix you can then use to find sections coded at both a regular and organisation code.
It may not look that useful at first, is it not just a bunch of cells with numbers?
Each number is a count of how many sections of text are coded for the relevant row and column codes for the cell.
Far more important though - and not made obvious by how NVivo displays the results - is that you can double-click on any of the cells! That will open a Code Results view for all the text for that cell. So, for the coding matrix query used in the screenshot, if you click on the cell where row = campaign and column = Gold, it will open a results view showing all text coded at both campaign and Gold - in other words, all the text for campaign that we coded as potential gold for using as quotes when writing up.
