1: Overview of the Compat Levels
The compat level for dashboards has been upgraded to 4. By default, this level is used for newly created dashboards
Compat level 4: Allows responsiveness for larger and smaller screens. Grouping of Charts and Table.
Compat level 3: Combines local filters with global filters for charts and tables.
Compat level 2: Using the Crosstabs engine, this level provides substantially faster performance over the legacy system.
Compat level 1: Uses the legacy Dashboard engine for rendering a dashboard. Existing dashboards remain at compat level 1 but can easily be upgraded to level 2, if desired.
Dashboards that are created will now default to using the compat 4 engine, which has the latest responsive design as well as new dashboard grouping functionalities.
Existing dashboards will remain using the compat 1 (legacy) or compat 2 engine. A few notes in regards to earlier dashboard compat levels:
- The (legacy) engine evaluates all Python code, so complex Python logic is welcome.
- The compat 2 (faster) engine can compute a subset of Python code. This will dramatically increase dashboard calculations up to 100x. Notably, any code that you can use to generate logic in Crosstabs or the survey builder can be evaluated. See the section on Logic Syntax for more information.
You may toggle any dashboard to use any compat level using the drop down menu found in the dashboard editor.
2.1: Differences in Compat 1 and Compat 2 Logic
There a few notable differences in the way Python logic is evaluated between the two compat levels. To illustrate the difference, examine the following 2D question:
<radio label="q1"> <row label="r1">Row 1</row> <row label="r2">Row 2</row> <col label="c1">Col 1</col> <col label="c2">Col 2</col> <col label="c3">Col 3</col> </radio>
Given this row logic added to a dashboard:
- The "1 (legacy)" compat engine will evaluate the logic above to mean any column was selected for r1 except c1, because c1's value is 0 (False).
- The "2 (faster)" compat engine will evaluate the logic above to mean any column was selected for r1, c1 or c2 or c3.
To be compatible in both systems, you should use the following logic:
- The logic above will evaluate to mean any answered was selected for r1 in any way.
3: About Compat Level 4
The new compat level 4 allows:
- The dashboard to be responsive for larger or smaller screens.
- Grouping of charts and tables by using
endgrouptags. All the charts/table enclosed with the group tag are shown in one container.
- By using
layoutattribute in a group one can control how grouped elements are displayed in their container.
keepwith=[id]moves the element into the same column as the specified element.
4: About Compat Level 3
In compat level 3, global filters now work with local filters and both are used to filter data. If you add global filters and then create a chart or table with a local filter, the dashboard shows the result of the global filter and local combined.
5: About Compat Level 2
With compat 2 dashboards you can apply per-record weighting:
- globally to all surveys
- a specific segment only
The per-record weighting means that each respondent has a Float type question that contains the weight to apply to the record. If you are using Crosstabs, you could have already uploaded a file with one or more weights. In that case, you can access the contents of the file in the nweight question but you can use any question you want for the weighting.
You can apply per-record weighting:
- globally to all surveys
- a specific segment only
5.1: Applying Global Weighting
To apply global weighting use the following command:
r5 is the segment and
val is the weighting value.
This command applies global weighting to any segment that does not have an explicit weight parameter.
5.2: Applying Weighting to a Specific Segment
To apply weighting to a specific segment only, use the following:
banner Weighted versus Unweighted
segment weight=vweight.r1.val Weighted (algorithm 1)
segment weight=vweight.r2.val Weighted (algorithm 2)
Note that weighting a segment overrides any global weight configuration, so it is a convenient way to compare weighted vs unweighted data for the same survey.
5.3: Compat Level 2 Limitations
The Crosstabs engine complies expressions (e.g. q3.r1.any) into instructions and sends them to a virtual machine. In contrast, the dashboard engine (compat 1) first evaluates the code in Python. In general, though, any logic condition that is created in builder, is supported by compat level 2. Click here to learn more about the logic that is supported by the Crosstabs engine.
6: Upgrading Existing Dashboards
To upgrade an existing dashboard, open the dashboard in edit mode and change the compat level, as desired. Save the dashboard, run it, and review any errors.
6.1: Updating Expressions
If the existing dashboard had complex Python expressions, those may generate an error. You can change those expressions into virtual questions to remove the error.
Also note that a few Python expressions may work but not as intended and changes may be required.
For example, if q1 is a 2D radio question grouped by cols, then the condition
q2.c1 would (in builder's logic GUI, virtuals or with compat 1 dashboard) be true if the answer was non-zero . This means “None” (not answered) or 0 (row r1 selected) are both false answers.
For compat 2 dashboard, this is false only if
q2.c1 is not answered and is true if the column is answered.
To be compatible with both systems, use
q2.c1.any for it to evaluate to true if c1 is answered in any way.