Databases Reference
In-Depth Information
From this window, we are able to see the variables that have been previously
defined. Click on the
Add
button and the
New Variable
dialog will appear, where
we will type the name we want to assign to our new variable.
The default name is
Variable1
. Change it to
vTop
and click on
OK
. The variable will
be created and we will now be able to assign a value to it. To do that, highlight the
new variable by clicking on its name and, in the
Deinition
pane on the lower part
of the window, type the number
5
. Then, in the
Comment
field, add the following
comment to describe what the variable is for:
Variable used to dynamically change the number of displayed values in
a Top N Chart.
It's important to first highlight the variable by clicking on its name before entering the
variable's definition, otherwise the definition we enter will not be correctly applied.
Using variables in charts
Our new variable will, for now, contain a simple and static value. We will use that
value to manipulate a chart. Specifically, this value will represent the number of
carriers that should be shown in a bar chart, based on their number of flights. Only
the top five carriers shall be shown.
Create a new bar chart with
Carrier Name
as dimension and
Sum([# Departures
Performed])
as the expression. From the
Sort
dialog window, make sure the
Carrier
Name
values are sorted by
Y-Value
in descending order.
Our new chart should so far look like the following screenshot: