Databases Reference
In-Depth Information
We can't simply remove the
Route
dimension because even though we will get a
grouped
Load Factor %
value for each airline, it will not be what we are looking
for as the
Average Load Factor per Route per Airline
value is not the same as the
Load Factor per Airline
value. Instead, we will use the
Aggr
function to solve the
requirement by entering the chart expression as follows:
Avg(Aggr($(eLoadFactor), Airline, [From - To Airport ID]))
Notice how we've included both dimensions in the
Aggr
function. Additionally, this
function will also account for routes with zero or missing load factors, which are by
default not shown in the straight table.
We will keep a second expression with the
Load Factor per Airline
value to show
the difference in both calculations. The second expression column will have the
following definition:
$(eLoadFactor)
Now, we can remove the
Route
dimension from our chart and we will get
the following:
With the use of the
Aggr
function, a QlikView document can be empowered
enormously and we are able to accomplish things that are almost impossible with
other tools, especially because all calculations are being performed on the fly.
Be sure to save the changes we've made to the
Airline
Operations
document before continuing.