EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials QlikView Tutorial QlikView Set Analysis
Secondary Sidebar
QlikView Tutorial
  • Basics
    • What is QlikView
    • QlikView Architecture
    • Qlikview Dashboard
    • QlikView Functions
    • Peek Function in QlikView
    • QlikView Tools
    • QlikView Set Analysis
    • QlikView Charts
    • QlikView Concatenate
    • QlikView Left Join
    • QlikView Interview Questions
    • QlikView SubField
    • QlikView ApplyMap
    • QlikView Aggr

Related Courses

QlikView Certification Course

Business Intelligence Courses

Business Analysis Certification Course

QlikView Set Analysis

By Priya PedamkarPriya Pedamkar

qlikview set analysis

Introduction to QlikView Set Analysis

In any dashboard/ report, it is always best to have more contexts, which makes our dashboard more meaningful. Adding context to our dashboard basically means that we have to provide a lot of insights, comparison with the relevant products and timeline. This will make our dashboard action-oriented. This can be achieved with the help of the Qlikview feature called the Set Analysis which helps in adding context to our dashboard. By using the set expression we can make our objects like chart/table to tell us information related to different sets of data. Let us try to understand what exactly is set analysis, this feature in qlikview is used to segregate our data that are available in different sheet objects into multiple sets and keeps some of their value unchanged, in this way we filter the data in one sheet which helps us to understand the corresponding changes in the different sheets, in this way we will be able to compare our set of records in the same table/chart by using set analysis.

Syntax and Examples of QlikView Set Analysis

Before we dig into the syntax of the set expression let us understand the major features of set analysis,

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (86,700 ratings)
  • It should be used in aggregation functions
  • Set expression starts and ends with curly brackets {}
  • It is used for the creation of different selection
  • All the modifiers start and end with <>
  • An operator that should be used in the set analysis is =
  • An identifier used is $

We use set expressions to perform our set analysis and these expressions are written within {}. It can contain the below-mentioned elements

  • Identifier
  • Operator
  • Modifier

Ideally, the logical sequence of set expression would start with an identifier and then comes the modifier and finally the operator.

1. Set Identifier

Identifiers are the basic elements of a set expression is used for the identification of active set, it is the state of the data set and the set expression starts with the identifier as its first element. To make our understanding much easier we can think of identifier as the FROM statement we use in SQL.

Syntax:

sum ({identifier} document name)

Identifiers can be any one of the below-mentioned options

  • $: Dollar symbol talks about the currently selected set. E.g. sum ({$} tax) – it gives the sum of tax document for the selected set.
  • 1: Symbol 1 indicates that it does not bother about the selected set and it will consider the entire data. E.g. sum({1} tax) – it gives the sum of all the data that are available in the tax document irrespective of the current selection
  • Bookmark: This will consider any bookmarked set for the procession. E.g. sum ({2010 tax} tax)- it gives output as sum of the tax data that are stored in the bookmark named as 2010 tax.
  • $1: This symbol represents the set that is chosen as the previously selected set, we can also use $0 for current and $-1 for the forward selected set. e.g. sum({$1} tax) – it gives output as the sum of tax data that are selected previously.
  • Myaltstate: this used to refer to a selection that is made in an alternate state.

2. Set Operators

Operators perform the function by combining and manipulating our selected set. The operand for the operator will be the selected set and the result will also be a set. The thumb rule for the evaluation of operators is from left to right. Qlikview uses these 4 as the basic operators

  • +/Union: This operator stands for union and it will just arbitrarily combine the two set’s data and give as output. E.g. sum({ $ + 2010 tax} tax) – this expression gives output as a set which is a combination of the selected tax data set and the 2010 tax data set.
  • -/exclusion: This is an exclusion operator, where it will give an output set that excludes the mentioned second operand. E.g. sum ({1 -$} tax) – this expression gives the output as a set which excludes the currently selected set that is mentioned in the expression by dollar symbol.
  • */intersection: This returns a set which is an intersection of both the sets mentioned as an operand. E.g. sum ({$ * 2010 tax} tax) – this expression gives the output as the common data set between the currently selected set and the bookmarked set.
  • / – this is an XOR operator; basically it gives the symmetric difference between the two sets. E.g. sum ({$ / 2010 tax} tax) – this expression will return the result as a set where the sum of the tax data is calculated for the contained and not the shared data along with the bookmarked data.

The precedence of the evaluation of operators in Qlikview is that intersection and XOR operators are evaluated first and then union and exclusion operators are evaluated.

3. Set Modifiers

Modifiers are used to make the necessary and specific alterations to the set of data that are selected, we can imagine modifier as a WHERE statement that we use in SQL. It uses many field names where each field name will have its own selection. Modifiers are always written with the <> brackets inside the set analysis expression. Modifiers by default will consider the identifier as the currently selected set if we do not mention a separate identifier. Let us try to understand it through an example:

  • Sum ({$ < year= {2014}   >} tax): This gives the output as the sum of selected tax data for the year 2014.
  • Sum ({$ < year= year – {2014} >} tax): This expression returns the output as the sum of the selected tax data excluding the year 2014.
  • sum ( {$  < product = {“ ”}  >} tax): This will give the output set as the sum of all the tax data for the selected set for all products.
  • Sum ( {1 <Year = {2003, 2004}, Country = {‘India’}> } tax): This expression will give the output as sum of all the tax data for the year 2003, 2004 where the country is India.

Conclusion

Qlikview’s set analysis is a very powerful function as it helps us in doing all kinds of filtering and manipulation of data with the same chart or table. The syntax for the set expression can be more complex as well based on what kind of data we need to filter and take. There are a variety of applications for set analysis in the market, for example, we can use them for the comparison of our most sold products vs. least sold products, hence learning this would really help in understanding the data well.

Recommended Articles

This is a guide to QlikView Set Analysis. Here we discuss syntax and examples of qlikview set analysis which includes set identifier, operator and, modifier. You may also look at the following articles to learn more –

  1. What is Data Analytics
  2. QlikView Interview Questions
  3. Data Analysis Tools
  4. Complete Guide to UNION in Oracle
  5. How to Works QlikView Concatenate?
  6. Guide to QlikView Architecture
Popular Course in this category
QlikView Training (2 Courses, 1 Project)
  2 Online Courses |  1 Hands-on Project |  9+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Business Intelligence Training (12 Courses, 6+ Projects)4.9
Business Analysis Training - Planning Monitoring and Strategy Analysis (12 Courses, 8 Case Study/Project)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more