Analyticsintermediate
Filters, Prompts & Presentation Variables
Distinguish column filters, dashboard prompts, and presentation variables, and explain how they interact to create dynamic, interactive dashboards.
Three mechanisms make a dashboard interactive, and the question is how a user's choice reaches the queries.
A dashboard prompt is like a thermostat dial in a building's lobby: one dial (the prompt) broadcasts a single target temperature (the presentation variable) that every vent (each analysis) in the building reads and adjusts to, instead of someone manually resetting every single vent by hand.
Key Concepts
1
filter built into an analysis; always applies
dashboard prompt a control on the dashboard; the user chooses
presentation variable carries the chosen value to wherever it
is referenced2
How a prompt reaches an analysis, by default. A prompt on Region affects every analysis on the page that
includes Region as a filter set to "is prompted".
3
analysis filter: Region is prompted
-> the prompt's value is applied
-> no prompt value chosen: no restriction on Region4
"Is prompted" is the wiring. An analysis without it ignores the prompt entirely, which is the usual reason a
prompt "does not work".
5
Presentation variables are for everything else. A prompt can set a variable instead of filtering
directly, and the variable is then referenced anywhere:
6
prompt sets: pv_region
used in a filter: Region = @{pv_region}
used in a title: Sales for @{pv_region}
used in a formula: CASE WHEN Region = '@{pv_region}' THEN ...7
That is what lets a user's choice appear in a report title, or drive a calculation rather than a filter.
8
Always give a default. @{pv_region}{All Regions} supplies a value when nothing has been chosen — the
part in braces. Without it, the first render has an unresolved variable and either errors or filters on
nothing.
@{pv_region}{All Regions}
9
The variable types, which get confused.
presentation variable set by a prompt, scoped to the dashboard
session
session variable set at login, per user, from the RPD
repository variable one value for everyone, refreshed on a
schedule10
A presentation variable is the user's current choice. A session variable is who they are. Using one where
the other belongs is a common bug — particularly using a presentation variable for security, which the user
can change.
11
Security never goes in a prompt. A prompt is a user control, so any filter driven by one is a filter the
user can alter. Row-level security belongs in the RPD, applied by the server.
12
Prompt performance. A prompt listing values runs its own query, so a dropdown over a million-row
dimension is slow every time the page loads. Constrain it, or use a search-style prompt rather than a
full list.
13
What the interviewer is probing.1. "What is the difference between a filter and a prompt?" Probing: the distinction. Stalls:
"Nothing." Moves up: a filter constrains the query; a prompt collects a value from the user that a
filter or variable then uses.
14
2. "What is a presentation variable for?" Probing: the mechanism. Stalls: "Filtering."
Moves up: carrying a prompted value into column formulas, titles and conditions — not only into
the filter.
15
3. "Why is the is-prompted filter operator useful?" Probing: the practical idiom. Stalls: "It is not." *Moves
up:* it lets one analysis respond to a dashboard prompt without hard-coding which column, so the
same analysis works on several dashboards.
16
4. "What is the performance trap with prompts?" Probing: experience. Stalls: "None." *Moves
up:* a prompt listing all values of a large column runs an expensive distinct query on every page
load — constrain or limit it.