Activation by Document Variable

The selection of documents for the analysis, such as searches for coded segments, can be done easily by hand: You can activate all the documents of the project, the documents of a particular document group, or even a single document. But more complex selective coding searches are difficult to do by hand.

For this reason there are also automatic activation options. With the Activate by Document Variables function, you can choose to activate documents based on the variable values that have been assigned to them. If you have defined variables for gender, age, and education level, for example, you could choose to select only those documents that represent women over the age of 40 that have at least a high school education. These activations can be made by entering the appropriate formulas. The formula syntax in MAXQDA is similar to that of statistics programs like SPSS.

The Activate by Document Variables function always processes the entire project. You can access the function by

  • selecting Activate Documents by Variables in the Mixed Methods tab or,
  • by right-clicking on the Documents icon in the “Document System” and choosing Activate Documents by Variables from the context menu that appears, or
  • clicking the icon with the same name in the “Document System”
Accessing the function from the context menu

After clicking on the appropriate button, a dialog window will appear where you can enter the formulas for activation. In the example mentioned above, we would want to activate only document with women over the age of 40 with a high school education. The dialog window is made up of the following sections:

  • A section for the logical formulas and the buttons to create a new formula, delete the currently selected formula, or delete all formulas.
  • Checkboxes for selecting operators.
  • Icons for opening or saving formulas.
Dialog field for activation by variable

All logical conditions must have the following components:

variable name / operator / value

If you have created a variable called “Education” and defined the education levels as “low”, “intermediate” and “high”, we would use the following formula in order to activate those documents that are interviews with participants with a rather low educational level:

Education = low

To create such an condition in MAXQDA, proceed as follows:

  1. Double-click on the variable “Education” from the list of variables on the left side of the window. You will see the following text in the condition window:

    Education = <empty>

  2. The only thing that is missing at this point is the variable value. On the right side of the screen you will see a field where you can enter the value. Here you could enter “low,” or simply click on the arrow to open the drop-down menu and select a value from the list of all the values that have been entered for a document up to that point. In our example above, “low”, “intermediate” and “high” would be in the menu. Using this menu helps you to avoid any typos.
    For numeric variables, MAXQDA inserts the value 0 in each newly inserted condition. For Boolean variables, you can use “0” for “false” and “1” for “true”.
  3. Since the “=” operator is used most often, it is automatically selected when you start a new formula. If you want to use a different logical operator, simply choose it from the right side of the window and MAXQDA automatically replaces the “=” operator.

The operators have the following meanings:

= (equal to) Selects variable values that are the same as the formula value.

< (smaller than) Selects variables values that are smaller than the formula value.

≤ (smaller or equal to) Selects variables values that are smaller or eqaul to the formula value.

> (larger than) Selects variable values that are larger than the formula value.

≥ (larger or equal to) Selects variable values that are larger or equal to the formula value.

≠ (unequal) Selects variable values that are not the same as the formula value.

⊃ (contains) This operator is only offered for text variables. Selects variable values that contain the formula value within their text.

Tip: It is possible to specify the condition that a non-numerical variable value should be <empty>. Then all documents to which no variable value was assigned will be selected.

Results of activations by document variables

Once you have entered the correct logical formulas, you can start the automatic activation. Click on the Activate button.

MAXQDA then checks the variable values assigned to each document to check whether it matches the formulated criteria. The documents that matched the criteria are now activated (marked red) in the “Document System.”

Tip: The status bar at the bottom of the MAXQDA window shows you how many documents have been activated.

If you want to activate documents frequently based on the same criteria, it is recommended that you save the activation model as a document set. To do so, select the option New set from the dialog window. MAXQDA will then create a document set containing the activated documents. This new document set can be activated at any time in the Document System, without having to call up the function for automatic activation via document variables.

Complex Logical Formulas

It is also possible to combine various logical formulas. The basic units of these combinations are still the formulas in their basic form:

variable name / operator / value

Combining formulas just means that you are connecting two of these basic formulas with an operator.

In the above example, we used the condition “Education=low” to activate all documents of participants with a rather low level of education.

If you want to further limit the results, so that you only see what participants over 30 years with a low level of education had to say, you need to define a second condition, namely “Age > 30”. In addition, you need to combine these conditions by a logical AND. The second condition, would be created just like the first condition:

  1. Double-click on the variable Age from the list of variables. The new condition will look like this:

    [Age] = <empty>

  2. Type in “30” for the value and choose the operator >(larger than).
  3. MAXQDA automatically inserts the OR operator. To use the AND operator instead, select the appropriate option in the right-hand pane. According to the schema, any number of other logical combinations can be added. Click the Activate button to begin.

In this way, you can add as many combinations of logical formulas as you want. You can then click Activate to start the activations.

The combination operators OR and AND have the following affect on the results of your activation process: If you choose the OR option, MAXQDA looks for documents that meet at least one of the various formulas’ criteria. If you entered the formulas “Education = low” OR “Age > 30,” you will get all the documents of participants with a low level od education as well as participants older than 30 years. For our example, then, the OR option would not be appropriate. We want both formulas to be met, so we would need to use the AND operator, so that it looks as follows:

A complex logical formula (AND-combination)

Deleting formulas

It is possible to go back and delete a formula at any time:

  • Click on the row you wish to delete.
  • Click on the  Delete button.

Changing and saving formulas

After starting the automatic activation process, the dialog window is no longer seen. The formulas, however, will still be in that window the next time you open it.

You can change the logical formulas (operators and values) at any time:

  • Click on the Formula in the dialog window, and select another operator.
  • If you want to change the value, simply enter the new value or select it from the drop-down menu.

After you have changed the formula, click on the Activate button to restart the activation.

You can also save a formula, so that you can have quick access to it at a later time. Just click on the Save  symbol at the bottom of the dialog window. You can then give it a name and choose where you want to save it.

Files for saved logical formulas are saved by MAXQDA as .LOA (logical activation) files. To open a saved formula, choose Open and navigate to the place you saved the .LOA file. It makes sense to set up a folder for all of your LOA files, so they are easy to find.

Using code variables for Activation by code variables

It is not only possible to activate documents based on their document variables; you can also activate codes based on their assigned code variables. The Activate by Code Variable function can be accessed by right-clicking on the top level entry (Code System) in the “Code System” and choosing the Activate Codes via Variables option in the context menu.

Activate by Code Variables function in the “Code System” context menu