Filters and Weighting
Filters
Filters allow you to restrict analysis to only those questionnaires that match a given condition. A filter is defined by a formula in a special syntax.
How to set a filter
- Go to the Filters tab
- Enter the filter formula in the
Filter formulafield - Click the Filter ON button (▶)
- The status bar will show the number of filtered questionnaires
How to remove a filter
Click the Filter OFF button (⏹) — the filter will be removed and all questionnaires will be available again.
Filter Formula Syntax
Referencing variables (questions)
Variable number is specified in square brackets [N], where N is the variable number or its name (vName).
| Syntax | Description |
|---|---|
[5] |
Value of variable #5 (PassportValue for qn, numeric value for qm) |
[5]=3 |
Variable #5 equals alternative with PassportValue=3 (for qn) |
[5,3] |
Alternative 3 is selected in multi-variant variable #5 (for qj). Also works for qn and qm |
[age] |
Reference by variable name (vName) instead of number |
Comparison operators
| Operator | Description |
|---|---|
= |
Equal to |
<> |
Not equal to |
> |
Greater than |
< |
Less than |
>= |
Greater than or equal to |
<= |
Less than or equal to |
Logical operators
| Operator | Description |
|---|---|
and |
Logical AND |
or |
Logical OR |
not |
Logical NOT |
Special functions
| Function | Description |
|---|---|
NA(N) |
Returns true if variable #N has "No Answer" value |
Caj(N) |
Returns the number of selected alternatives for variable #N. For qm/qn: 0 if NA, 1 otherwise. For qj: number of selected options |
NF |
Returns the current questionnaire number |
true |
Always true (all questionnaires) |
false |
Always false (no questionnaires) |
Parentheses
Use parentheses () to group conditions and change operation priority.
Filter Examples
Simple filters
[1]=1
[3]>=18
[10,5]
Compound filters
[1]=1 and [3]>=18
[1]=1 or [1]=2
([1]=1 or [1]=2) and [3]>=25
not NA(5)
Caj(10)>=3
Filter by variable name
[gender]=1 and [age]>=18
[1]=1 and [3]>=18, if vName of variable #1 = gender and variable #3 = age.
Saved Filters
Filters can be saved for reuse:
- Enter the filter formula
- Click the Save Filter button (💾)
- Enter the filter name
- The filter will appear in the saved filters list
Saved filters are bound to the array and stored in the XML settings file.
To apply a saved filter — click on it in the list.
Deleting Filtered Questionnaires
You can physically delete questionnaires that match the filter:
- Set the filter
- Click the Delete filtered questionnaires button (🗑)
- Confirm deletion
⚠️ Warning! This operation is irreversible. Deleted questionnaires cannot be restored. It is recommended to save a copy of the array before deletion.
Weighting
Weighting allows you to assign an individual weight to each questionnaire to correct the sample.
How to enable weighting
- Select a metric variable (
qm) in the Weight dropdown - The program will automatically assign each questionnaire a weight equal to the value of the selected variable
💡 Tip: The program automatically highlights variables whose text contains the word
weightorвес.
How to disable weighting
Select None in the Weight dropdown. All weights will be set to 1.
How weighting works
- Weight is taken from a metric variable (type
qm) - If a questionnaire has NA (no answer) for the variable, weight = 0
- Weighting affects all calculations: totals, percentages, means, etc.
- The status bar displays
Weight ON #N#orWeight OFF
Splits
Splits allow you to automatically break table building by groups (e.g., a separate table for each city).
How to enable a split
- Select a nominal (
qn) or multi-variant (qj) variable in the Split dropdown - When building tables, the program will automatically create separate tables for each alternative of the selected variable
How splits work
- For
qnvariables: a filter[N]=altis created for each alternative - For
qjvariables: a filter[N,alt]is created for each alternative - If a filter is also active, the split is combined with it:
(filter) and (split) - In the output Excel file, a row with split information is displayed before each table
How to disable a split
Select None in the Split dropdown.