Databases Reference
In-Depth Information
Straight table
What is known as a straight table in QlikView is in fact a regular table. It can contain
dimensions and calculated expressions, which makes it the ideal candidate to display
our KPIs.
Straight table versus Table box
New QlikView developers often confuse the straight table with
the table box. While a straight table can contain both dimensions
and expressions, a table box, which is created by selecting
Layout
|
New Sheet Object
|
Table Box
from the menu bar, can only
contain dimensions. This makes it unsuited to display calculated
aggregations. The table box can be very useful to display a quick
list of possible combinations of fields in the data model, though.
Let's follow these steps to create our KPI straight table:
1.
Go to
Layout
|
New Sheet Object
|
Chart
in the menu bar.
2.
On the
General
tab, select the
Straight Table
option in the
Chart Type
section (bottom right icon).
3.
In the
Window Title
input box, place the following expression and click on
Next
:
='KPIs per ' &GetCurrentField(Airline_Origin_Destination)
4. On the
Dimensions
tab, select the
Airline_Origin_Destination
cycle group
from the
Available Fields/Groups
list and double-click on it to move it to the
Used Dimensions
list.
5. Click on
Next
to go to the
Expressions
tab.
6. Create three new expressions using the predefined variables (or enter
their expressions directly, if you did not create the variables) and their
corresponding labels:
°
Load Factor %
:
$(eLoadFactor)
°
Performed vs Scheduled flights
:
$(ePerformedVsScheduled)
°
Air time %
:
$(eAirTime)
7. Click on
Next
twice to go to the
Presentation
tab.
8. Change the
Alignment
settings for all three expressions so that
Label
and
Data (Text)
are set to
Right
and
Label (Vertical)
is set to
Bottom
.
9. Under the
Totals
section, select the
Totals on Last Row
radio button.
10. Under
Multiline Settings
, mark the
Wrap Header Text
checkbox.