Creating and managing variables (AskiaVista)

You may sometimes want to include a variable (question) in your analysis that pulls together data from existing variables in the survey. For example, you might want to include an age by gender variable, combining data from existing, but separate, age and gender variables. Once your custom variable has been defined, you can include it in your charts and tables just as with any standard variable.

To create, edit and manage variables, you use the Variables view. To open the Variables view, at the top of the screen click View, then Variables.

When it is open, the Variables view view hides several areas of the screen (the table results and the properties, rows, columns and edges panels). To close the Variables view (and reveal these areas of the screen again), at the top right-hand corner of the screen, click Close.

In this topic:

Creating a new variable from scratch

To create a variable:

  1. If the Variables view is not already open, at the top of the screen click View, then Variables.
  2. At the top of the Variables view, click Create a new variable:
    icn-new
  3. Select the type of variable you want to create: Numeric or Closed.
  4. You can then define the variable; see defining a variable, below.

Creating a variable based on an existing one

Sometimes, you will want to create a new variable based on an existing one. This means that you only need to change some aspects of the new variable, rather than defining it from the ground up.

To duplicate a variable:

  1. If the Variables view is not already open, at the top of the screen click View, then Variables.
  2. At the top of the Variables view, select the variable you want to copy from the drop-down list.
  3. Click Duplicate the variable:
    icn-duplicate
  4. You can then define the new variable; see defining a variable, below.

Editing an existing variable

To edit a variable:

  1. If the Variables view is not already open, at the top of the screen click View, then Variables.
  2. At the top of the Variables view, select the variable you want to edit from the drop-down list.
  3. You can then define the variable; see defining a variable, below.

Defining a variable (AskiaVista)

The following fields are available when you define a variable:

Askiavista offers two ways to define a variable, Assisted mode and Script mode. To select the mode you want to work in, simply click Assisted or Script as appropriate. Each mode has its own benefits:

When you switch mode between Assisted and Script modes, your condition is converted to the new format. For example, if you have defined a condition in Assisted mode and then switch to Script mode, the condition is converted to a script. Note that you cannot begin creating a variable in script mode and then switch to assisted mode.
When you have finished defining your variable, you will want to save it.

Saving the variable

When you have finished creating or editing the variable, you will want to save your changes. At the top of the variables view, click Save the variable:

icn-save-template-normal

Sharing a variable with co-workers or clients

You can share a saved variable with other askiavista users (co-workers or clients). If you want to share a variable you have just created, note that you need to save it first (click Save the variable).

To share a variable:

  1. If the Variables view is not already open, at the top of the screen click View, then Variables.
  2. At the top of the Variables view, select the variable you want to share from the drop-down list.
  3. Click Share the variable:
    icn-share-normal

The Share variable modal displays a list of the people with whom the variable is currently shared.

To add a person to the list:

  1. Click in the text-box at the bottom of the window. A drop-down list appears, containing the people who have AskiaVista accounts.
  2. To quickly find someone in the drop-down list, start typing part of the person's name, and the list will be filtered to show the people whose names contain the letters you type.
  3. Select the person from the drop-down list which appears.
  4. Click Add (you can add several people at once if you wish; this means that if you are adding multiple people, there is no need to click Add after every name).
  5. Repeat steps 2-4 for each person you want to add.
  6. Click Share. The Share variable modal window closes.

You can remove a person from the list, which means that they lose all rights to use or change the variable.

To remove a person from the list:

  1. In the Share variable modal, select the person in the list.
  2. Click Remove:
    icn-remove-share-normal(1)

You can set the access rights and sharing rights for each person in the list, by selecting from the dropdown lists as appropriate.

The access rights are:

The sharing options are:

Deleting a variable

You can delete a previously saved variable, if you have the appropriate access rights for that variable.

To delete a variable:

  1. If the Variables view is not already open, at the top of the screen click View, then Variables.
  2. At the top of the variables view, select the variable you want to delete from the drop-down list.
  3. Click Remove variable:
    icn-remove(1)
  4. When you are asked to confirm your choice, click Yes.

Checking a variable's syntax

When you are defining a variable, you can have askiascript check its syntax. AskiaVista will report any incorrect syntax. To check the variable's syntax, simply click Check variable:

Note: in no way does this validation imply that AskiaVista can verify a condition's logic, that is, whether or not it will have the intended effect. This check only confirms that the correct AskiaScript syntax has been used, and it is possible that logical errors in the syntax remain.
Create your own Knowledge Base