Databases Reference
In-Depth Information
or
Amsterdam, Netherlands: Schiphol
If we are only interested in extracting the actual name of the airport, the part behind
the colon, we could use the following expression:
mid(index([Destination Airport], ':') + 2)
In this example, we first use the index function to retrieve the position of the colon.
We then tell the mid function to retrieve the string that starts two positions to the
right of the colon (we don't want the colon or the trailing space).
Similarly, we can use nested functions to retrieve the name of the town:
left([Destination Airport], index([Destination Airport], ',') - 1)
This tells the left function to retrieve all characters up to the first occurrence of
a comma.
Numbers and numeric functions
QlikView supports the basic arithmetic operators.
Operator
Explanation
Example
Result
+
Add
2 + 2
4
-
Subtract
10 - 5
5
*
Multiply
5 * 5
25
/
Divide
25 / 5
5
The following table shows some of the most important numeric functions:
Function
Explanation
Example
Result
Ceil()
Round up. Optionally, a parameter can
be specified to indicate which multiple
to round up to.
Ceil(2.5)
Ceil(2.6, 0.25)
3
2.75
Floor()
Round down. Optionally, a parameter
can be specified to indicate which
multiple to round up to.
Floor(2.5)
Floor(2.6, 0.25)
2
2.5
Round()
Round the number. Optionally, a
parameter can be specified to indicate
which multiple to round to.
Round(3.14)
Round(3.16, 0.1)
Round(3.14, 0.1)
3
3.20
3.10
 
Search WWH ::




Custom Search