Set Analysis essentials
A QlikView document is always in the current state. It shows data and aggregation on the current selections made by the user. In most dashboard applications, you have to perform aggregations or perform comparisons between the current selection/state and alternative selections or states in the chart. Set Analysis is powerful in such scenarios:
Set Analysis is very useful for comparisons such as comparing "current year" with "previous year"
Set Analysis can be only be used with the Aggregation function. Here we should always begin and end with curly brackets { }
Set Analysis consists of three components: Identifiers, Operators, and Modifiers:
An Identifier defines a set. As seen in the following function declarations,
$
represents the records in the current selection and1
represents the set of all the records in the entire document. Bookmark and Alternate States can also be used as identifiers.Sum({$}LineSalesAmount)
: This function returns sales for the current selection...