Professional Documents
Culture Documents
QlikView Set Analysis Cheat Sheet
QlikView Set Analysis Cheat Sheet
PRO TIPS
QLIKVIEW COMPONENTS SCRIPTING LIBRARY ELEMENT FUNCTIONS
Using set analysis for period-over-period comparisons (point in There are two special functions that can be used in set
time reporting) has never been easier. With the QlikView expressions to implicitly specify an element list. The functions
Components scripting library, you can generate set variables are:
automatically and use them in your expressions right away. P() - to use all possible values in a field (as dictated by the
current selection state) as the element list.
One line of code to create both a master calendar table and the E() - to use all excluded values in a field (as dictated by the
related set variables. current selection state) as the element list.
CALL Qvc.CalendarFromField('OrderDate');
A quick example:
Then, on the expression, you can get, for instance, the previous Sum({1<Year = p(Year)>} Sales)
years month to date sales with:
Sum($(vSetPreviousYearMTD) Sales) This expression will use the full set of data disregarding all user
selections (using 1 as the set identifier), but take into account
Visit www.qlikviewcomponents.org to learn more. those records corresponding to the years that the user has
selected. In other words, only selections made on the Year field
are considered.
RESOURCES ABOUT
To learn more about the power of Set Analysis: This material was created by Miguel Ángel García, co-author of
Memorize this Cheat Sheet! the book QlikView 11 for Developers.
Visit the series of blog posts titled “The Magic of Set Analysis”
at the AfterSync blog (http://blog.aftersync.com). Checkout more resources like this at
Get your hands on the QlikView 11 for Developers book, https://aftersync.com/blog
authored by Miguel Ángel García and Barry Harmsen.
Get your hands dirty and start experimenting!
www.aftersync.com