0% found this document useful (0 votes)
167 views11 pages

Mastering Set Analysis

This document provides an overview of set analysis in QlikView, including: - The three components of set analysis syntax: set identifier, set modifier, and set operators - Examples of set identifiers, modifiers, and interesting operators like exclusion, union, intersection, and symmetric difference - How values are handled for strings, numbers, and expressions in set modifiers - Key concepts like the = sign representing assignment by association rather than equality, and the two levels of curly braces - A review of additional concepts like modifiers themselves being sets, and the use of angle brackets and quotes in the syntax

Uploaded by

Madhavan Eyunni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views11 pages

Mastering Set Analysis

This document provides an overview of set analysis in QlikView, including: - The three components of set analysis syntax: set identifier, set modifier, and set operators - Examples of set identifiers, modifiers, and interesting operators like exclusion, union, intersection, and symmetric difference - How values are handled for strings, numbers, and expressions in set modifiers - Key concepts like the = sign representing assignment by association rather than equality, and the two levels of curly braces - A review of additional concepts like modifiers themselves being sets, and the use of angle brackets and quotes in the syntax

Uploaded by

Madhavan Eyunni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Set A Set B

Mastering Set Analysis


Created by: Mastering QlikView Set Analysis course
Shilpan Patel, learnqlickview.com
Set Analysis Syntax
Three components:

◉ Set identifier (defines scope of the record set)


◉ Set modifier (adds filters)
◉ Set operators (allow interactions between sets)

Two curly braces:


{} Outer curly braces for the record set, inner curly braces for the element set

There is always an = sign between field name and element set in the modifier

Field name Assignment operator

Sum ({$<Salesperson = {‘John Doe’}>} Sales)

Set Identifier Set Modifier


Set Identifiers
Set Identifiers
Set Operators

Union Returns the set of all records that


+ belong to the unioned sets

Exclusion Returns records that belong to the


- first but not the other of the two
set identifiers.

Intersection Returns records that belong to


* both of the set identifiers.

Symmetric Returns a set that belongs to


/ Difference either, but not both of the set
identifiers.
Interesting Operators: Examples

Exclusion Union Intersection Symmetric Difference

A B A B
A B A B

< [Category Name] -= {'Seafood'}> < [Category Name] += {'Seafood'}> < [Category Name] *= {'Seafood'}> < [Category Name] /= {'Seafood'}>

Removes Seafood category from user selection Includes all selected categories and Seafood Excludes all categories but Seafood Includes all categories but Seafood
Set Modifiers: Examples

◉count( {1<Modality= {‘Radiology’} >} PatientID )


Returns Radiology patient count disregarding the current selection.
◉sum( {$<Year = {2000}, Region = {‘US’, ‘SE’, ‘DE’, ‘UK’, ‘FR’}>} Sales )
Returns the sales for current selection, but with new selections both in 'Year' and in
'Region'.
◉sum( {$<Year = {"2*"}>} Sales )
Returns the sales for the current selection, but with all years beginning with the number .
Since this is a Year field, it is for all years from 2000 onwards.
◉sum( {$<Year ={"2*","198*"} - {2000}>} Sales )
As above, but also the 1980’s are included in the selection, but the year 2000 is
excluded.
Remember!

String values Numeric values Expressions or Search

Require single quotes Do not require single Require double quotes


within the element set. or double quotes

Example: Example: Example:


< SalesPerson = {‘Joe’}> < OrderID = {1001}> <Year = {“>=2011"} >
<Year = {“(2009)|(201*)”}>
Under the hood

Data set Element Record set


values Set values values

RHS of the modifier LHS of the modifier Aggregation


Let’s review some concepts

Modifiers are sets too! = Sign in the modifier Two Curly braces {}

Remember that both LHS and Is not an equal sign. It is an Outer curly braces for the
RHS of the modifiers are sets assignment by association record set and inner curly
braces for the elementset

< > Angle brackets Quotes Mixed state

Modifier starts with left angle Litteral values need single Record set can be in a default
bracket and ends with right quote; search string or state while element set can be
bracket. expression requires double in different state such as
quotes and numeric values alternate state.
require no quotes.
Thanks!
Created by:
Mastering QlikView Set Analysis course

Enroll in our course on Udemy


Mastering QlikView and Qlik Sense Set
Analysis
Shilpan Patel, learnqlickview.com

You might also like