The Presentation Variable is the only variable offered by the Presentation service. It will take the datatype of the presentation column on which the prompt is created.
Syntax: @{variables.<variableName>}{<default>}[format]
variables: Optional
variableName: It refers to the variable which should be different from the existed variable names.
Default: The default value of the variable.
Format: It represents the format in which the variable values need to be displayed.
You can reference presentation variables in the following areas
- Answers :
- Title Views
- Narrative Views
- Column Filters
- Column Formulas
- Conditional Formatting conditions
- Chart scale markers.
- Gauge range settings.
- Static text.
- Direct Database Requests
- Dashboard prompts
- iBot Headlines and text
Some examples are given below with a presentation variable “Year” and as default value the max of the year :
@{Year}{max(Calendar."Calendar Year" by) }
Column Formula:
You can also set it in a formula. Example :
CASEWHEN @{Year}{max(Calendar."Calendar Year" BY) } = '2001' THEN 'It''s the year 2001'ELSE 'You choose an other year' end
or
CASEWHEN @{Year}{max(Calendar."Calendar Year" BY) } < Calendar."Calendar Year"THEN 'The Year is greater than the presentation variable ' ||cast(@{Year}{max(Calendar."Calendar Year" BY) } AS char)WHEN @{Year}{max(Calendar."Calendar Year" BY) } = Calendar."Calendar Year"THEN 'The Year is equal to the presentation variable ' ||cast(@{Year}{max(Calendar."Calendar Year" BY) } AS char)ELSE 'The Year is smaller than the presentation variable ' ||cast(@{Year}{max(Calendar."Calendar Year" BY) } AS char) end
Filter:
Title View:
No comments:
Post a Comment