Book Image

QlikView Unlocked

By : Andrew Dove, Roger Stone
Book Image

QlikView Unlocked

By: Andrew Dove, Roger Stone

Overview of this book

QlikView Unlocked will provide you with new insights to get the very best from QlikView. This book will help you to develop skills to work with data efficiently. We will cover all the secrets of unleashing the full power of QlikView, which will enable you to make better use of the tool and create better results for future projects. In the course of this book, we will walk you through techniques and best practices that will enable you to be more productive. You will gain quick insights into the tool with the help of short steps called ”keys,” which will help you discover new features of QlikView. Moving on you will learn new techniques for data visualization, scripting, data modeling, and more. This book will then cover best practices to help you establish an efficient system with improved performance. We will also teach you some tricks that will help you speed up development processes, monitor data with dashboards, and so on. By the end of this book, you will have gained beneficial tips, tricks, and techniques to enhance the overall experience of working with QlikView.
Table of Contents (16 chapters)
QlikView Unlocked
About the Authors
About the Reviewers
Hidden Image List

Previous() and Peek() functions

Within the scripting language, there are two functions that appear to do the same thing. These are the Previous() and Peek() functions. However, there is a subtle difference between the two when it comes to the script, and it is not just the number of parameters.

The Peek() function has a lot more parameters and can be used outside a Load statement as well, but this is not the issue here.

The following two statements work in exactly the same way:

if(Previous([Manufacturer No])=[Manufacturer No],1) as SameManuf

if(Peek('Manufacturer No')=[Manufacturer No],1) as  SameManuf 

Both check to see if the previous record had the same Manufacturer No value (as long as data is sorted in this field). However, if we want to make a counter field, we can only use the Peek() function as the Previous() function must be used to refer to a field that actually exists in the source data.

Take a look at this statement:

if(Peek('Manufacturer No')=[Manufacturer No],