Snap XMP Help
Testing and running a report using the global context
When running reports with tables and charts, you often want to filter your results to a certain sub-group of respondents. For example, you may wish to filter your results to only show respondents who visited a certain cafe. Context allows you to add a global filter to your tables and charts. You can edit the global filter when you need to run the report for different subsets of respondents. This can be used to test your report.
The Crocodile Rock Cafe survey is used as an example.
Setting the global context
- Select File|Context Values to open the Context Values dialog.
- Double click the global context value to open it. This allows you to set the context to a specific value. Note: The global context will always be present in Snap – it is not possible to delete it
- In the Variable column, enter the variable that is used for the context. In the example, this is set to Q0 (the location).
- In the Value column, enter the code value. In the example, this is set to 1, which sets the current context to Bristol.
- Click to save the context.
Testing the report
- Open the Reports window and double click on the report to open it.
- To edit the data set that this report uses, apply a filter to the entire report. Adding a Filter to the report and leaving the Context blank, filters the data on the current global context. In this example, the filterQ0=Q0@Context is used to filter the data on Q0 (the location) set as the global context.
- Click to run the report.
- Click Preview to provide an on-screen preview of your report. It should show a single report for Bristol. Check through your report to confirm that it behaves as you expect.
- Click Close to close the preview window.
- Repeat for all the code values of the global context variable.