Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Qlik Sense Cookbook. - Second Edition

You're reading from  Qlik Sense Cookbook. - Second Edition

Product type Book
Published in Aug 2018
Publisher Packt
ISBN-13 9781788997058
Pages 334 pages
Edition 2nd Edition
Languages
Authors (3):
Pablo Labbe Pablo Labbe
Profile icon Pablo Labbe
Philip Hand Philip Hand
Profile icon Philip Hand
Neeraj Kharpate Neeraj Kharpate
Profile icon Neeraj Kharpate
View More author details

Table of Contents (16) Chapters

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Getting Started with the Data Visualizations Scripting Managing Apps and the User Interface Useful Functions Set Analysis Using Extensions in Qlik Sense Advanced Aggregation with AGGR Tips and Tricks Other Books You May Enjoy Index

Combining set analysis with Aggr


This recipe will show you how to use set analysis with aggregation functions combined with Aggr().

Set analysis modifies the behavior of the filters in an aggregation expression. When using Aggr(), you have two aggregations, one inside Aggr() and the other outside Aggr(), as in the following example:

= Max( Aggr(rank(Sum(Sales)), Country)) 

Where to insert the set analysis expression? Will the result be the same?

This recipe will show how the set analysis in the inner or the outer aggregation affects the result.

Getting ready

For this recipe, we will reuse the data load for the Using nested aggregation recipe from ealier in this chapter.

How to do it…

  1. Drag a Table object.
  2. Add the text, Europe Rank, as the object title.
  3. Add a dimension: Country.
  4. Uncheck the Include null values property.
  5. Add a new measure with the following expression, with the Regional Rank label:
= Max( Aggr(rank(Sum( {<Region={'Europe'}>} Sales)), Country))
  1. Add the second measure with the following...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}