Qlik Community

QlikView Documents

Documents for QlikView related information.

Variables

Variables

Variables are really useful for a lot of things because you could store many different things within them and this could be changed while runtime or on user-action. Therefore they will be called variables.

QlikView is here no exception and the use of variables is quite common. Very known examples are the format-code variables which will be automatically created on the first script-tab like: SET DateFormat='DD.MM.YYYY';


Format Variable Tweaks

And there are many more inbuilt variables like the system-variables or error-variables which are very helpful.

There are different ways how to create variables and you need to know which syntax to apply for which kind of content and how you could access them again. It's easier as you think if you read the following links carefully:

The Magic of Variables

The Magic of Dollar Expansions

Q-Tip #6 - Those Tricky $-Sign Expansions | Natural Synergies

The Little Equals Sign

Re: Literals as sub parameters become variables

Especially the possibility to create user-defined functions with variables is very useful:

Variable That Acts Like a User-Defined Function.

Dynamic Field Expressions with Variables

Variables with Parameters

To document things is in general recommended as well as by variables but be careful:

Well-commented variables. Be careful!

A special kind of variables are include-variables which could contain any kind of script-parts:

The $(Include) which you $(Must_Include) into your toolkit

And of course you could use the same variables not only in one application if you used a centralized approach to keep variables outside from QlikView:

Central KPI Formula Repository (solution)

Storing variables outside of QlikView

Loading Variables Via Loadscript

Managing Variables

Re: Setting a variable in script...

How to store and recover variables

Create Colour Variables from an Excel Workbook

Transforming Variables to Strings for the Load Script using Sublime Text

But not all variables which you creates do you need forever therefore to delete unneeded variables is an important task and has its difficulties and of course there are several ways of doing it: Deleting variables

Another topic is to transfer variables from one application to another:

Macro to Copy Variables In From Another Document

More on Copy Variables From One Document to Another

QlikView Maven: Utility That Can Extract and Show All of the Variables from Your QlikView Document

Helpful might also be to read respectively to analyse your variables:

Recursively resolve $(variables) to get readable sourcecode


There is some content-overlapping within the above used links but I think the complement to each other is useful and of course you will find many more interesting postings here within the qlik community to these topic - the notes here are a good starting point to go further.

Have fun!

Marcus Sommer

Comments
lubicz99
Valued Contributor

Nice Repository of information, Marcus.  I am bookmarking this one for future reference

Not applicable

Very helpful. Thanks!

vinay_bangari
Valued Contributor III

very helpful

engishfaque
Valued Contributor III

Nice work. For more, Number Format

beck110979
Valued Contributor III

Thanks for sharing, very helpful

jtibbutt
Visitor

Excellent, bookmarked.

developer90210
New Contributor II

Brilliant resource - wish I'd saw this back in 2015

Thanks for sharing!

Version history
Revision #:
1 of 1
Last update:
‎12-21-2015 07:05 AM
Updated by: