Apply skip logic

If your survey has skip logic, where a question may apply only to a subset of respondents, you can use permanent filters to limit the element's view to just those respondents who were shown the question.

Example

For example, a survey asks respondents for their specialty in S1. The survey has a skip pattern where "What grade nurse are you? (S2) is only shown to respondents who answered "Practice Nurse" in S1.

Protobi chart showing S2 'What grade nurse are you?' with large [NA] bar at 60% (n=60) representing respondents who didn't see the question. Remaining bars show nurse grades: Band 2-4 (1%, n=1), Band 5 (9%, n=9), Band 6 (15%, n=15), Band 7 (9%, n=9), Band 8+ (6%, n=6).

60% of respondents in S2 count as [NA] because they were not shown the question. Press on the value "Practice Nurse" in S1 and you'll see all those respondents answered S2

Protobi chart showing S2 filtered by 'Practice Nurse' from S1. Chart shows nurse grades without NA bar. Percentages recalculated for filtered subset: Band 2-4 (2%, n=1), Band 5 (22%, n=9), Band 6 (38%, n=15), Band 7 (22%, n=9), Band 8+ (15%, n=6). All bars now total 100% of practice nurses.

Apply permanent filters

In the example above, we press filtered for "Practice Nurse" in S1. This defines a scenario where the relevant subset of respondents is selected (see Press to query tutorial). 

We can apply this filter to S2 only. This will permanently limit the element to only those respondents who were shown the question.

Press the edit icon (blue circle) and select "Filters..." from the context menu:

Protobi context menu showing options including Filters, Sort, Chart type, Statistics, Format, Transform, Round by, Color, More properties, and Edit JSON. 'Filters...' option highlighted at top of menu.

In the Filters dialog select "Apply current filters" and press Ok:

Protobi Filters dialog showing filter options. Dialog displays current active filter 's1 : Practice Nurse' in gray box. Two buttons below: 'Apply current filters' and 'Clear filters'. Cancel and Ok buttons at bottom.

The element is now permanently limited to Nurses, and this is automatically labeled in the footnote:

Protobi chart showing S2 'What grade nurse are you?' with permanent filter applied. Chart displays nurse grades without NA values: Band 2-4 (2%, n=1), Band 5 (22%, n=9), Band 6 (38%, n=15), Band 7 (22%, n=9), Band 8+ (15%, n=6). Footnote at bottom shows 'Base: s1 : Practice Nurse (40)' indicating permanent filter.

Note:

  • The element filter is applied in addition to any global and current filters that are selected in the project.  
  • Filters applied to a group (square icon) are recursively set for child elements within the group.
  • You can override the automatic footnote by pressing on it to directly edit the text.

 

Clear filters

To clear a filter, select "Clear filters" from the Filters dialog.

Editing the filter in JSON

Filters can be also be edited using the "Edit JSON..." option in the context menu.  This can be useful for advanced cases.

For example, the above S2 filter will have the "filter" attribute set using the MongoDB logic:

Copy the filter to another element

You can highlight the entire filter attribute and copy it into the JSON Editor for other elements that follows the same skip pattern.