Using contexts in your reports Archives | SnapSurveys Support documentation for Snap Surveys products Wed, 04 Oct 2023 14:45:53 +0000 en-GB hourly 1 https://wordpress.org/?v=6.4.5 https://www.snapsurveys.com/support-snapxmp/wp-content/uploads/2020/07/favicon-32x32-1.png Using contexts in your reports Archives | SnapSurveys 32 32 Using external filters and contexts https://www.snapsurveys.com/support-snapxmp/snapxmp/using-external-filters-and-contexts/ Thu, 24 Jun 2021 09:59:48 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=5939 External filters and contexts can be defined in the Analyses and Reports windows. They are available to apply to analyses and reports to limit which data responses are included in the analysis or report. The external filters and contexts are also used to specify how a shared user can filter reports and analyses in Snap […]

The post Using external filters and contexts appeared first on SnapSurveys.

]]>
External filters and contexts can be defined in the Analyses and Reports windows. They are available to apply to analyses and reports to limit which data responses are included in the analysis or report. The external filters and contexts are also used to specify how a shared user can filter reports and analyses in Snap XMP Online.

Defining external filters and contexts

The external filters and contexts are defined from the Analyses or Reports windows. Once defined, the filter or context can be applied to reports and analyses in Snap XMP Desktop and Snap XMP Online.

DefFilterContext.PNG
  1. Click Analyses AnalysesIcon.png or Reports  ReportsIcon.png on the Snap XMP Desktop toolbar.
  2. Click on Define External Filter/Context  FilterIcon.png . This opens the Define External Filter/Context dialog.
  3. Select the Filter tab to enter a filter or the Context tab to enter a context.
  4. Click Add to add a new filter or context variable to the list. Select from the list of variables in the selected survey and click OK.
  5. Use Move Up and Move Down to change the order of the list.
  6. Select the variable that you wish to apply a mask to and enter the name of the mask variable in the Mask field (this must be in the format of variable@context).

Applying external filters and contexts

External filters or contexts allow you to filter the cases used in an analysis or report without changing the analysis or report definition. This is useful for testing the filters available in Snap XMP Online.

Apply a filter or context for an analysis by:

  1. Click Analyses AnalysesIcon.png on the Snap XMP Desktop toolbar.
  2. Open the analysis in the Analysis Display dialog.
  3. Click on Apply External Filter/Context  FilterIcon.png . This opens the Apply External Filter/Context dialog. If this is disabled then select Allow additional filters on the Analysis Definition dialog.

Apply a filter or context for a report by:

  1. Click Reports  ReportsIcon.png on the Snap XMP Desktop toolbar.
  2. Select the Report and click Execute/Check Report RunIcon.png on the Reports toolbar.
  3. Click the Filter/Context button. This opens the Apply External Filter/Context dialog.

In the Apply External Filter/Context dialog:

  1. Select the Filter or Context tab.
  2. Select the code(s) in the selected variable(s) in the list to apply a filter or context.
  3. If you have applied a mask to the filter, the filter codes displayed will depend on the mask settings.
ApplyFilterContext.PNG
  1. Click OK to apply the filters and contexts to the analysis or report.

The post Using external filters and contexts appeared first on SnapSurveys.

]]>
Producing a comparison report using a context value https://www.snapsurveys.com/support-snapxmp/snapxmp/producing-a-comparison-report-using-a-context-value/ Thu, 12 Nov 2020 11:18:20 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=3314 A comparison report compares a single individual, department etc, against the performance of others in your organisation or against a general benchmark. The survey uses variables that define the individuals or departments that you wish to evaluate. Context values allow you to select data that is relevant to that individual or department. Steps for generating […]

The post Producing a comparison report using a context value appeared first on SnapSurveys.

]]>
A comparison report compares a single individual, department etc, against the performance of others in your organisation or against a general benchmark. The survey uses variables that define the individuals or departments that you wish to evaluate.

Context values allow you to select data that is relevant to that individual or department.

Steps for generating context reports

  1. Create variables for the items that will produce the individual reports. These are your context variables.
  2. Create any derived variables needed to analyse your context data relative to other data or a benchmark.
  3. Create your reports, referencing the context for each item that you want to personalise.
  4. Add context filters to your reports to select the appropriate data.
  5. Test your reports by setting the context manually.
  6. Set up your reports to run automatically through all the context values.

Setting up a derived variable to analyse your data

If you wish to include some comparison charts, showing how the subject of the report compares to the average, then you cannot use a filter, as this would only use the subject data. Instead, you must create a derived variable that you can use to break down your data.

This example shows you how to set up a derived variable for the Crocodile Rock Cafe survey supplied with Snap XMP Desktop, allowing you to compare ratings for the current (contextualised) location with ratings for all locations. It allows comparisons between the current location and all locations (including the current) and other locations (all locations excluding the current location).

  1. Open the Crocodile Rock Cafe survey supplied with Snap XMP Desktop.
  2. Click VariablesIcon.png on the Snap toolbar to display the Variables window.
  3. Click NewSurveyIcon.png on the Variables window toolbar to add a new variable.
  4. Specify the Variable details:
    • Name: CComparison
    • Label: Compare context to all
    • Type: Derived (the variable will derive its data from Q0, the existing location question).
    • Response: Multiple (each respondent will fall into two cases).
  5. Double click in the first code label and click the Insert button. Select Variable Field from the drop-down list.
Insert menu for a variable field
  1. Select Q0 (the location) as the Variable, and Context as the Aspect. This will give the selected location as the code label. Press OK to return to the variable definition.
Insert a new context variable field
  1. In the Values field, enter Q0=Q0@context. This code will be used when the response applies to the specified location.
  2. In the next Label field, enter Other sites. Then enter NOT(Q0=Q0@context) as the Value. This code will be used when the response does not apply to the specified location.
  3. In the next Label field and enter All sites. Then enter True as the Value.
Derived variable using the context
  1. Click SaveIcon.png to save the comparison variable.

Creating a comparison bar chart

You can use a context variable to create a comparison bar chart that compares the results of the subject of the report to a benchmark value or the data for other subjects.

To set up the comparison chart you need to:

  • create derived variables for the comparisons you wish to make
  • define the chart
  • set the context to test the chart

This example uses the Crocodile Rock Cafe survey to compare the average amount spent at one site with amounts spent at other sites.

  1. Click AnalysisChartIcon.png to display the Analysis Definition dialog for a chart.
  2. Select the chart style Bar Counts from the drop-down list.
  3. Type the names of the derived variable into the Analysis field, for example CComparison.
  4. Check the Transpose box.
  5. Select Means & Significances from the Calculate list and enter Q5 as the variable to use.
Chart used in the comparison report
  1. Change to the Notes/Titles tab and click in the Title field
  2. Enter the title of your chart, using the Insert button to open the Variable field... dialog and insert the Label Aspect of Q5 and the Context Aspect of Q0 in the title.
  3. Clear the Chart Axis titles.
Insert the current context in the report title
  1. Click Apply to see your chart. It will have no data for the subject as no context has been set.
Chart comparing different contexts
  1. Select File|Context Values to open the Context Values dialog.
  2. Double click the global context value to open it. This allows you to set the context to a specific value.
  3. Set the Variable to Q0 (the location) and the Value to 1. This sets the current context to Bristol.
Global context values
  1. Click SaveIcon.png to save the context.
  2. Click 1 2 3  button on the chart toolbar to update the chart. The context information will appear.
Chart comparing different contexts

The post Producing a comparison report using a context value appeared first on SnapSurveys.

]]>
Conditional inclusion based on context https://www.snapsurveys.com/support-snapxmp/snapxmp/conditional-inclusion-based-on-context/ Thu, 12 Nov 2020 10:33:27 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=3310 You may only want to display or run an instruction in certain circumstances. For example, when running a report to context, you may only want to display information for a specific situation, such as a specific month.  You can set conditions depending on the current context. The example shows a context value for all months […]

The post Conditional inclusion based on context appeared first on SnapSurveys.

]]>
You may only want to display or run an instruction in certain circumstances. For example, when running a report to context, you may only want to display information for a specific situation, such as a specific month.  You can set conditions depending on the current context.

The example shows a context value for all months of the year. An instruction is defined that is only included if the context is January. It assumes that you have a context variable Month.

  1. Enter not(Month@context=1) in the NA box to only use the Information instruction when the month has been set to 1 (January).
Conditionally include context based on the context
  1. Select File|Context values and open the global context.
  2. Set the month to January in the global context.
Global context values
  1. When you run the report, check if the January instruction has been included.
  2. Change the month in the global context and run the report again. Check that the January instruction has been omitted.

The post Conditional inclusion based on context appeared first on SnapSurveys.

]]>
Generating multiple reports using a context https://www.snapsurveys.com/support-snapxmp/snapxmp/generating-multiple-reports-using-a-context/ Wed, 11 Nov 2020 17:11:54 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=3297 Running a report to a context produces multiple reports – one for each possible code for that context. This can be used to: create one large report containing multiple versions of the report, one for each context create a separate PDF for each iteration of the context The examples use the Crocodile Rock Cafe survey […]

The post Generating multiple reports using a context appeared first on SnapSurveys.

]]>
Running a report to a context produces multiple reports – one for each possible code for that context.

This can be used to:

  • create one large report containing multiple versions of the report, one for each context
  • create a separate PDF for each iteration of the context

The examples use the Crocodile Rock Cafe survey that is supplied with Snap.

Creating the Context Data Set

  1. Open the Crocodile Rock Cafe survey supplied with Snap.
  2. Set up your Context Data Set. For this example, it uses the single variable Q0 (the location question) as the context. This enables you to automatically create a report for each possible value of location.
Context data set
  1. Click SaveIcon.png to save the context.
  2. Before using the context check that the global context value is not set.

Running the report with sub reports

  1. Click ReportsIcon.png to open the Reports window.
  2. Double click the report to open it. In this example, the Summary report is used.
  3. In Filter, enter the context filter, in this case Q0=Q0@context.
  4. In Context, enter the context data set, in this case CX1
Report details showing a context and context filter
  1. Click Run button to run the report. This produces a single report containing one sub-report for each possible value of the context.

Running the report to create multiple PDFs

  1. In the Report Summary, click New Instruction NewSurveyIcon.png to add a new Page Layout instruction. Alternatively, you can edit an existing Page Layout if there is one at the beginning of the Report.
  2. Select Start New Page.
  3. Select Restart Page numbers to ensure that each document starts on page 1.
  4. Select Start New Document. This places the report in a new file, so each time it creates the report for the different context, it will start a new file.
  5. Click Insert and select Variable field from the list.
  6. Select the context variable, for example Q0, as the Variable and Context as the Aspect. This will use the label of the Location for the current context as the filename, so the report for Boston will be given a filename of Boston, MA.pdf.
Insert a new context variable field
  1. Click OK to insert the variable.
Page layout instruction starting a new report document for each context
  1. Click OK to save the report instruction.
  2. Click  Run button  to run the report then click OK on the Report Execution dialog. Depending on the PDF driver that you are using, and the way it has been set up, it will either automatically save or ask you to save the files.

The post Generating multiple reports using a context appeared first on SnapSurveys.

]]>
Testing and running a report using the global context https://www.snapsurveys.com/support-snapxmp/snapxmp/testing-and-running-a-report-using-the-global-context/ Wed, 11 Nov 2020 11:04:49 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=3286 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 […]

The post Testing and running a report using the global context appeared first on SnapSurveys.

]]>
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

  1. Select File|Context Values to open the Context Values dialog.
Context Values showing the global context
  1. 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
  2. In the Variable column, enter the variable that is used for the context. In the example, this is set to Q0 (the location).
  3. In the Value column, enter the code value. In the example, this is set to 1, which sets the current context to Bristol.
Global context values
  1. Click SaveIcon.png to save the context.

Testing the report

  1. Open the Reports window and double click on the report to open it.
  2. 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.
Report details showing a context filter
  1. Click Run button to run the report.
  2. 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.
  3. Click Close to close the preview window.
  4. Repeat for all the code values of the global context variable.

The post Testing and running a report using the global context appeared first on SnapSurveys.

]]>
Creating a context for reporting https://www.snapsurveys.com/support-snapxmp/snapxmp/creating-a-context-for-reporting/ Fri, 06 Nov 2020 10:08:50 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=3261 When including a context in your report there must be variables in your survey that will hold this information. These are the context variables. Using the Crocodile Rock Survey, the instructions show how to set up a context variable for the Location. Select File|Context Values to open the Context Values window. The global context value […]

The post Creating a context for reporting appeared first on SnapSurveys.

]]>
When including a context in your report there must be variables in your survey that will hold this information. These are the context variables.

Using the Crocodile Rock Survey, the instructions show how to set up a context variable for the Location.

  1. Select File|Context Values to open the Context Values window. The global context value allows you to test your contexts.
Context Values showing the global context
  1. Click NewSurveyIcon.png to create a new context.
  2. The Context Data Set dialog appears. By default it will have a name of CX1
Context data set
  1. Set the Type to Raw data. This uses data in the survey (the raw data file).
  2. Set the Name and Label to something that you will understand later on.
  3. Add the variable that holds the context information to the variable list. If you are using several variables to create your context enter them as a comma separated list.
  4. Click SaveIcon.png to save the context.

You can now use this context value to automatically generate multiple reports.

The post Creating a context for reporting appeared first on SnapSurveys.

]]>
Introduction to contexts https://www.snapsurveys.com/support-snapxmp/snapxmp/introduction-to-contexts/ Thu, 05 Nov 2020 10:03:16 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=3255 When you are creating a Smart Report, you usually want to put the most up-to-date data in the report. This data changes as more responses come in, so you must have a way of representing it that allows it to change when the data changes. You can look at all the survey data or focus […]

The post Introduction to contexts appeared first on SnapSurveys.

]]>
When you are creating a Smart Report, you usually want to put the most up-to-date data in the report. This data changes as more responses come in, so you must have a way of representing it that allows it to change when the data changes. You can look at all the survey data or focus on a subset that you are interested in. There are two ways of doing this:

Using a filter

This allows you to select the cases that you are interested in. For example, you might filter your data so you are only looking at the data provided by respondents over 50.

This method is easy to set up, but means that you cannot see data that has been filtered out. For example, you would only be able to analyse the blue mouse data once a blue mouse filter has been applied.

Filtering

Using a context

This allows you to look at a subset of data in a group of cases which have been tagged with a value in a context variable. You can also access data without that tag value, so you can compare the tagged subset with all data.

For example, if your context variable was “mouse colour”, you could set the context to “blue”.

Grouping by context

You would be able to analyse the data for mice tagged as blue, but you could also compare the blue mice to the other mice.

The owner of the blue mice could get a personalised report that showed how their mice compared to the average mouse.

By setting the context to red, you can generate a report for the owner of the red mice with the appropriate data for their mice.

Grouping by context

The context does not just work on data. You can associate images, chart labels or report text with the different contexts, so the report look and content will change when you change the context from blue to red.

The post Introduction to contexts appeared first on SnapSurveys.

]]>