Looking at data from different directions
Sometimes, we need to consider data from different directions. In this section, we will examine some advanced techniques for data manipulation that will make our lives easier.
Putting things first
We will often come across situations where we need to consider the earliest values in a dataset, either just the first number of rows or the first value in an ordered set. QlikView has functions for this.
First
The First
statement will precede a load and states the number of records that should be loaded:
First 10 Load * From Data.qvd (qvd);
Sometimes, if we want to just get a fixed set of rows from a file, we can use the Header option in Table Files Wizard to remove any rows preceding the rows we want and then use the First
statement to grab the lines that we do want. This can be an effective strategy where there are several datasets in one worksheet in Excel.
FirstSortedValue
FirstSortedValue
is a very advanced function that can be used both in the script and...