Creating an element based on a custom expression
This example is based on the Museum sample data set.
biology{.., ^Not_answered, expression('visits > 4')}
This example creates an axis based on the biology variable. It includes all of the elements in the axis with the exception of the Not answered category, but has an additional element, which is based on a custom expression. The custom expression selects respondents who entered a value greater than four when answering the question on which the visits variable is based. Because you have not specified a label for the special element, the label defaults to the expression text.
Enclose the custom expression in single quotation marks or two double quotation marks:
'<expression>'
""<expression>""
If the expression contains a text literal, you must escape the double quotation marks used to enclose the text literal as you do when a label contains a double quotation mark. For example, if you use single quotation marks, you must escape each of the double quotation marks that enclose the text literal with a second double quotation mark.
Table showing element based on a custom expression
Here is a table that has this axis on the top:
You can use any expression that is supported by the Data Model, including any of the functions in
Operators.
For more information, see
Advanced expressions.
See also