Databases Reference
In-Depth Information
A variable can have any number of parameters defined, all specified with a dollar
sign and a number that indicates the parameter's number: $1 , $2 , $3 , and so on.
When expanding the variable, the parameters are specified by enclosing them
in parentheses as a comma-separated list. For example, a variable with three
parameters would be expanded as follows:
$(VariableName(30, 20, 50))
Where the values 30 , 20 , and 50 are inserted into the corresponding parameter's
position in the variable definition.
Parameters in a variable can either be numbers or text; we can also arrange a
parameter to receive a field name to be used in the calculation, or even receive
values read from fields.
Double Dollar Sign Expansion
We've already discussed how storing expressions in variables can be a good idea for
re-using expressions, easily manage changes in them, as well as for data consistency
across sheet objects. We will push this idea a bit further by using those expression
variables to allow the user to switch among different metrics at his/her convenience.
1.
First, make sure the following expression variables are already in the
Airline Operations document. If the variables are not yet defined, refer
to Chapter 6 , Building Dashboards , to find their definitions and apply them:
° eDeparturesPerformed
° eEnplanedPassengers
° eAirTime
2.
Now, we will add a new island table to the data model via a Load Inline
statement. Open the Edit Script window and add a new tab at the end of the
script; name it Metrics . In this new tab, we will add the new table using the
Inline Data Wizard dialog ( Insert | Load Statement | Load Inline ):
 
Search WWH ::




Custom Search