Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Qlikview Unlocked

You're reading from  Qlikview Unlocked

Product type Book
Published in Nov 2015
Publisher Packt
ISBN-13 9781785285127
Pages 196 pages
Edition 1st Edition
Languages

Table of Contents (16) Chapters

QlikView Unlocked
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Behind Every Successful Project Is a Plan Building the Correct Environment Are You Sitting Comfortably? Be More Productive It's All About Understanding the Data The Right Data Model Pays Dividends Make It Easy on Yourself – Some QlikView Tips and Tricks Improving Chart Performance and Usability To Deployment and Beyond Hidden Image List
Index

Finding min and max


One of the standard pieces of script that tends to be used over and over again is the creation of a Master Calendar table. The first stage of this is to find the date range, from minimum to maximum, from your fact table and create all the possible days in between. In fact, this is even part of the main QlikView Developers' training course. We looked at this in Chapter 5, The Right Data Model Pays Dividends, when we created our Data Island.

The normal way to find the minimum and maximum dates is to use a piece of script such as this:

TempDates:
LOAD Min([Order Date]) as MinDate,
     Max([Order Date]) as MaxDate
Resident SalesOrders;

LET varMinDate=peek('MinDate',0,'TempDates');
LET varMaxDate=peek('MaxDate',0,'TempDates');

DROP Table TempDates;

Here, we created a one record table with the minimum and maximum values as separate fields and then used Peek on the resulting table to get the values.

This is fine if we only have a couple of thousand rows; however, when we talk...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}