Dealing with different data types
As we've seen in the previous section, QlikView offers a complete toolbox for dealing with data. In this section we will be looking at some of the most important operators and functions for dealing with strings, numbers, dates, and times.
Strings
Strings are pieces of text; in QlikView these are often used to provide context to the numbers. You may have noticed that in the script, strings are always enclosed between single quotes (').
String operators
The most common operation performed on strings is concatenating two or more strings together into a single string. This is achieved by using the &
operator, for example:
[First Name] &' '& [Last Name]
This concatenates the values of First Name
and Last Name
, with a space between them, into a single string containing the full name.
String functions
The following table shows the most important string functions.
Function |
Explanation |
Example |
Result |
---|---|---|---|
|
Returns the length of a string. |
|