Skip to main content
Skip table of contents

Creating a logical variable

You can create a new logical variable and save it in a codebook for subsequent analyses on an ongoing basis. For example, you can create a set of demographic categories to analyze target audiences, etc.

To create a logical variable, open the database and click the settings icon cog icon.png to open the Meta-Editor.

  • In Meta-Editor click the 'snowman' icon;

  • Pick 'Create Logical variable' from the dropdown list;

meta edito 1.png
  • In the pop-up window enter a variable name, then click OK.

  • Find the new variable in the codebook and select it - it will usually be placed at the bottom of the list. Then, click the ‘Edit’ icon to open the Logical Expression Builder (LEB) window;

name var.gif
  • In the Logical Expression Builder, the codebook is displayed on the left-hand panel. Drag&drop codes onto the ‘Categories’ panel to build the logical variable, combining them with the appropriate logical operators.

    • For example, to create the audience of ‘Women age 40+’, you should OR-join the age categories of 40-49 and 50+, then drop ‘female’ onto this and select AND-join.

  • Changes are saved automatically.

gif.gif

You can also build codes (logical expressions) directly in a crosstab, although these are not saved permanently within the codebook like logical variables.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.