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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QlikView Essentials

You're reading from   QlikView Essentials Want to solve your Business Intelligence headaches? Learn how QlikView can help, and discover a powerful yet accessible BI solution that lets you harness your data

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781784397289
Length 166 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Chandraish Sinha Chandraish Sinha
Author Profile Icon Chandraish Sinha
Chandraish Sinha
Arrow right icon
View More author details
Toc

Variables in QlikView


Variables are used to store static values or expressions. Variables make it easy to reuse expressions.

In QlikView, variables can be declared in the script or by invoking Variable Overview by pressing Ctrl + Alt +V. It can also be declared by navigating to Settings from menu and clicking on Variable Overview. Variables declared in the script can be seen in Variable Overview too.

In the script, variables are declared using Set and Let statements.

The Set statement assign literal strings to the variable, and the Let statement first evaluates the string and then assigns it to a variable:

Set vVariable1 =  1 +  3;  //Value of vVariable1 is 1  + 3
Let vVariable2 =   1  + 3;  //Value of vVariable2 is 4

It is important to discuss "dollar sign expansion" while discussing variables. Dollar sign expansions are definitions of text replacement. $(text) syntax expands the text that is between the $ sign and the parenthesis, and then it is evaluated. So an expression such as $(=1+3) will...

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