The very first step is to create the filtered dashboard. In the Serenytics vocabulary, we call it a template dashboard.
To transform a classical dashboard into a template dashboard, you need to add a global filter on the dashboard using a variable. In the capture below, we created this global filter on the datasource named "Sales data", on the field "Country", with the operator ==, and the variable name is __countryVar__. The {{ and }} are used to specify to our engine that this is a template variable that must be interpreted, and not a standard string.
When you add this filter, the widgets of the dashboard using this datasource will display an error message:
To test your dashboard with variables, you can start by using a "test" payload defined in the dashboard, using the "test payload" section:
This test payload is only available to help you to create the dashboard. If you open this dashboard in viewer mode, you will still see the errors as the test payload is not passed to the dashboard in this mode. This is also true if you generate a task to send this dashboard in PDF by email.
In the next section, you will learn how to pass the variable values to the dashboard when generating the PDF reports.