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.
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:
To create a variable:
Variables view is not already open, at the top of the screen click View, then Variables.Variables view, click Create a new variable:
Numeric or Closed.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:
Variables view is not already open, at the top of the screen click View, then Variables.Variables view, select the variable you want to copy from the drop-down list.Duplicate the variable:
To edit a variable:
Variables view is not already open, at the top of the screen click View, then Variables.Variables view, select the variable you want to edit from the drop-down list.The following fields are available when you define a variable:
Shortcut: Specify a name for the new variable. Note that you may use only alphanumeric characters (including most accented characters) and underscores in the variable shortcut; askiavista will not allow you to enter invalid characters in the variable shortcut.
Caption: Specify a title for the variable (this will be displayed in any tables in which the variable appears).
Level: Select the analysis level at which you want the new variable to operate. Normally, this would be at the level of Interviews, but you might want to place the new variable at the level of loop items, in which case you would select Items.
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:
Assisted mode: allows you to create conditions by using a GUI. You select the elements of your variable from an easy-to-use interface, and you do not need to know askiascript. For details, see using assisted mode.
Script mode: allows you to create even more sophisticated variables by using askiascript. For details, see using script mode. Askiavista can help you check that your script's syntax is correct. See checking a variable's syntax for details.
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:

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:
Variables view is not already open, at the top of the screen click View, then Variables.Variables view, select the variable you want to share from the drop-down list.Share the variable:
The Share variable modal displays a list of the people with whom the variable is currently shared.
To add a person to the list:
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).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:
Share variable modal, select the person in the list.Remove:.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8xMTAwLzMzMjkvY2tmaW5kZXIvaW1hZ2VzL2ltcG9ydC10eDVra2Z6YTY4NnEvaW1hZ2VzL2ljbi1yZW1vdmUtc2hhcmUtbm9ybWFsKDEpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NjQxNDI3Nn19fV19&Signature=Ws3ko2~2AYCU6AP2KzE-Thk9ozNegGJwKVgLjHbTMzpf9I5faDcwJ8aoXMXrMqip9LxQbgIPwsTYH6ldwdKs-uw9m0FATUvPkcPKw0h62Zb6PfxvH9KB2L8CpTKT9jPIeARbNfYb4ZRczW8G~OPgrUNJRZ2Fo4H3NjhYvnoZMVG9fFu2EwCqkAxsQRprEGA0YF5L7G8q5qgfN4ecobrA3RRz~XEuorcvA5nfyVWiL1K5VP~NP7sG9i2voHzuzF7v-dMJE6uF7zr0Vhy5eTfaEVJP-AYQsd0K5JEFqETvujy0mxjEcJeKCvzUG8zyhVwKeBaNxWrEwrt0F2fLqohkIw__&Key-Pair-Id=K2TK3EG287XSFC)
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:
View only: The person will be able to use the variable in their table definitions, but will not be able to make changes to it.
Can edit: The person will be able to use the variable in their table definitions, and make changes to it.
Is owner: The person will be granted owner privileges to the variable. This means that he or she will be able to use the variable in their table definitions, make changes to it, and delete it.
The sharing options are:
Cannot Share: The person will not be able to share the variable with other users.
Can Share: The person will be able to share the variable with other users.
You can delete a previously saved variable, if you have the appropriate access rights for that variable.
To delete a variable:
Variables view is not already open, at the top of the screen click View, then Variables.Remove variable:.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8xMTAwLzMzMjkvY2tmaW5kZXIvaW1hZ2VzL2ltcG9ydC10eDVra2Z6YTY4NnEvaW1hZ2VzL2ljbi1yZW1vdmUoMSkucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzY2NDE0Mjc2fX19XX0_&Signature=p~roYCH~XjvDhFMZMw0-LgJfqm5HfNt4gpMOShs8UlfH4klzwqo9CQKGxCIZ-SRiLbgxVx7j~iM98vsuUAHmobxbURyLwfl3Y7TSlf1fRjA9WI~SV60~3pBfVQ1p3DTsE6sdj4GSj8cVw1euL7qhXV-9ooRPaZoqqYVoa21NHpNXUksc9ProhuoKKl2CtT3Q7X0Y5~etjlD5q79UMDcpgDmAITcDU0lRWMOfMNP57IQHJwLQRco6BJu407-PougweYKmV9DwbLMQpFQNOYcBLpnOWBhZW2Z4Lcs5UdfGACQ7PlkuJPS1gWS0Qd1dTmS7GLn9KT2UIQ7Cxeq1rvIjkQ__&Key-Pair-Id=K2TK3EG287XSFC)
Yes.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:
