Databases Reference
In-Depth Information
Go to the
Variable Overview…
window (
Ctrl
+
Alt
+
V
) and click on the
Add
button.
From the
New Variable
window, type
vTotalFTEs
to name the new variable and
click on
OK
.
Next, highlight the variable and type the following expression from the
Definition
pane:
=Sum([# Equivalent FTEs])
Don't forget the equal to sign. This tells QlikView to calculate
the variable across all dimensions regardless of the context in
which the variable is used.
Click on
OK
to close the
Variable Overview…
window.
We will now proceed to create a new chart in the form of a straight table with
Carrier
Name
as the only dimension and having the following expression:
Sum([# Equivalent FTEs]) / $(vTotalFTEs)
From the
Number
tab of the
Chart Properties
window, assign a two-decimal format
and specify it to be shown as percentage.
These settings will result in a table with a list of carriers and the percentage of FTEs
each of them contributes to the total. Notice we have included our
vTotalFTEs
variable as the divisor with the Dollar Sign Expansion syntax.
Since the variable holds a single value, all rows in the straight table will be divided
by the same number, which represents the total number of FTEs employed by all
reporting airlines; the numerator value, which is the number of corresponding FTEs,
will be different for each carrier.