Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QlikView 11 for Developers

You're reading from   QlikView 11 for Developers This book is smartly built around a practical case study – HighCloud Airlines – to help you gain an in-depth understanding of how to build applications for Business Intelligence using QlikView. A superb hands-on guide.

Arrow left icon
Product type Paperback
Published in Nov 2012
Publisher Packt
ISBN-13 9781849686068
Length 534 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (23) Chapters Close

QlikView 11 for Developers
Credits
Foreword
About the Authors
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
1. Meet QlikView 2. Seeing is Believing FREE CHAPTER 3. Data Sources 4. Data Modeling 5. Styling Up 6. Building Dashboards 7. Scripting 8. Data Modeling Best Practices 9. Basic Data Transformation 10. Advanced Expressions 11. Set Analysis and Point In Time Reporting 12. Advanced Data Transformation 13. More on Visual Design and User Experience 14. Security Index

Conditional functions


Often in QlikView, you want to modify the data based on a condition. For example, we may want to classify any aircraft that was present in the database before 1990 as "Classic", and classify everything from 1990 onward as "Current". Let's open the script editor and see how this is done:

  1. Locate the [Aircraft Types] LOAD statement.

  2. Add a comma behind the line END_DATE as [Aircraft End Date] and press Return to create a new line.

  3. On the new line, put the following expression: If(Year(BEGIN_DATE) < 1990, 'Classic', 'Current') as [Aircraft Age Classification]

  4. As the 2010 update only contains aircraft that are newer than 2010, we do not need to use the conditional expression, instead we can use a fixed value.

  5. Add a comma behind the line END_DATE as [Aircraft End Date] and press Return to create a new line.

  6. Put the following expression on this line: 'Current' as [Aircraft Age Classification]

  7. Save and reload the document.

  8. Add Aircraft Age Classification field to the Aircraft...

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 $19.99/month. Cancel anytime
Banner background image