<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use Aggr, Max and Count together in Set Analysis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793636#M1034661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;SET ANALYSIS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;makes a dashboard lot more meaningful and action oriented. For example, if you just provide number of units sold by a product line in a month, it is good information, but it is not-actionable. If you add comparison against same month last year, last month or average of relevant product lines in this month, you have added context to the number. The business user can take more meaningful actions out of this report / dashboard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;QlikView has feature called SET ANALYSIS that provides us a way to add this context. Set analysis predefines the SET OF DATA that our charts / tables use. So, using a Set Expression, we can tell our object (chart / table) to display values corresponding to various sets of data (e.g. a pre-defined time-period, geographic region, product lines etc.). All of the examples, I mentioned above as part of adding context can be accomplished using Set Analysis in Qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Most of the QlikView Professionals think that SET ANALYSIS is a complex feature. Through this post, I am trying to change their conviction towards it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;What is SET ANALYSIS ?&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Set Analysis can be understood by a simple analogy of how Qlikview works. We make selections on certain variables and the changes reflect in the entire application. This happens because through our selection, we have created a set of data which we want to use. In a similar fashion, using Set Analysis feature, we can pre-define the data to be displayed in our charts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Some features and characteristics for Set analysis are:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;It is used to create different selection compared to the current application selections&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Must be used in aggregation function (Sum, Count….).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Expression always begins and ends with curly brackets { }&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG style="color: white; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Example dataset:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;SET ANALYSIS syntax broken down into three components:&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Identifiers:&lt;/SPAN&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="background: white;" width="574"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Identifier&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-left: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Description&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents an empty set, no records&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the set of all the records in the application&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;$&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the records of the current selection&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;$1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the previous selection&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Bookrmark01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the set of all records against bookmark ID or the bookmark name&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Examples:&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;In below example, Current year selection is 2012 and previous selection was 2013.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Operators :&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;It&amp;nbsp; works on set identifiers&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="background: white;" width="625"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Operator&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-left: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Operator Name&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-left: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Description&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;+&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Union&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns a set of records that belongs to union of sets.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Exclusion&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns records that belong to the first but not the second&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;*&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Intersection&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns records that belong to both of the set identifiers.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Symmetric Difference&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns a set that belongs to either, but not both of the set identifiers.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Examples:&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;In below example, I have created a bookmark “BOOKMARK_1” for company selection A, B and C.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Modifiers:&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Modifiers are always in angle brackets &amp;lt;&amp;gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;It consists multiple fields and all fields have selection criteria.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Condition of fields within modifiers bypass the current selection criteria.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Dollar Sign Expansion:&lt;/SPAN&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;If we want to compare current year sale with previous year, previous year sales should reflect values in relation to current selection of year. For example if current selection of year is 2012, previous year should be 2011 and for current selection of year 2013, previous year is 2012.&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #2c2b2b;"&gt; &lt;STRONG&gt;“=Sum ({$&amp;lt;Year = {$ (=Max (Year)-1)} &amp;gt;} Sale) “&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Above expression always returns sale for previous year. Here $ sign (Font color red) is used to evaluate the value for previous year. $ sign is used to evaluate expression and to use variables in set modifiers. If we have variable that holds last year value&lt;/SPAN&gt; &lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;(vLASTYEAR)&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;then expression can be written as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Courier New';"&gt;“=Sum ({$vLASTYEAR)} &amp;gt;} Sale) “&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center; background: white;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt; background: white;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: white;"&gt;Indirect SET ANALYSIS: Function P() and E() &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Let us take a scenario, where we want to show current sales of the companies who had sales last year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Expression should be similar like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Courier New';"&gt;=sum({$&amp;lt;Year={$(=Max(Year))},Company_Name={Companies who had sales last year}&amp;gt; } Sale)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;First we have to identify companies who had sales last year. To fix this problem, we will use function P() that is used to identify values within a field and function E() that exclude values within a field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Finally, we have expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Courier New';"&gt;=sum({&amp;lt;Year={$(=Max(Year))},Company_Name=P({&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;}Company_Name)&amp;gt;}Sale)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;This post was an example where we have brought out methods to use SET ANALYSIS in Qlikview. Have you used this feature before? If yes, did you find it useful? Do you have more nifty tricks to make Set Analysis more interesting? If not, do you think this article will enable you to use Set Analysis in your next dashboard?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Do let me know your thoughts on using this feature in QlikView.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2015 21:27:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-29T21:27:22Z</dc:date>
    <item>
      <title>How to use Aggr, Max and Count together in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793633#M1034658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table in QlikView with fields like Month, Dept, Entry date, Exit date, Files(no of file records) and I want to count the number of people stayed overnight in any department on daily basis. Also, I have to find the maximum capacity of any department&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I did in QlikView to get the results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="239" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#00FFFF&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; border-image: none; width: 769px; height: 241px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Month&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Calendar Date&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Dept&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;# of seats&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Sitting capacity of dept&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 6&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Jan&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30012015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;a&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Entry]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Exit], Files&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; background-color: #33cccc;"&gt;&lt;P&gt;How to get Max of "# of seats" aggregated at Dept level,&amp;nbsp; Month*Dept level and Calendar Date*Dept level.&lt;/P&gt;&lt;P&gt;Also the max value should repeat&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Jan&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;31012015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;s&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Entry]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Exit], Files&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; background-color: #33cccc;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Feb&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05022015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;s&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Entry]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Exit], Files&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; background-color: #33cccc;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Feb&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;17022015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;a&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Entry]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Exit], Files&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; background-color: #33cccc;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Mar&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01032015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;w&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Entry]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date Exit], Files&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; background-color: #33cccc;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date Entry&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date Exit&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;30012015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;17022015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;31012015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;03022015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;06022015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;13032015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;10022015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;13032015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;18022015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;13032015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please note that Calendar Date is from Master Calendar and is not linked to my database by any means&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Green column is what I want, Does anyone know how to get use all the aggr, count and max functions together&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be highly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sagar Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 21:10:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793633#M1034658</guid>
      <dc:creator />
      <dc:date>2015-01-29T21:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Aggr, Max and Count together in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793634#M1034659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello sagar go through this link &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.analyticsvidhya.com/blog/2014/02/aggr/" title="http://www.analyticsvidhya.com/blog/2014/02/aggr/"&gt;http://www.analyticsvidhya.com/blog/2014/02/aggr/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 21:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793634#M1034659</guid>
      <dc:creator />
      <dc:date>2015-01-29T21:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Aggr, Max and Count together in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793635#M1034660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://www.analyticsvidhya.com/blog/wp-content/uploads/2014/01/Set_Analysis_Syntax3.png" style="color: #1772af; font-family: arial; font-size: 12px; text-align: justify;" title="http://www.analyticsvidhya.com/blog/wp-content/uploads/2014/01/Set_Analysis_Syntax3.png"&gt;http://www.analyticsvidhya.com/blog/wp-content/uploads/2014/01/Set_Analysis_Syntax3.png&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 21:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793635#M1034660</guid>
      <dc:creator />
      <dc:date>2015-01-29T21:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Aggr, Max and Count together in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793636#M1034661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;SET ANALYSIS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;makes a dashboard lot more meaningful and action oriented. For example, if you just provide number of units sold by a product line in a month, it is good information, but it is not-actionable. If you add comparison against same month last year, last month or average of relevant product lines in this month, you have added context to the number. The business user can take more meaningful actions out of this report / dashboard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;QlikView has feature called SET ANALYSIS that provides us a way to add this context. Set analysis predefines the SET OF DATA that our charts / tables use. So, using a Set Expression, we can tell our object (chart / table) to display values corresponding to various sets of data (e.g. a pre-defined time-period, geographic region, product lines etc.). All of the examples, I mentioned above as part of adding context can be accomplished using Set Analysis in Qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Most of the QlikView Professionals think that SET ANALYSIS is a complex feature. Through this post, I am trying to change their conviction towards it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;What is SET ANALYSIS ?&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Set Analysis can be understood by a simple analogy of how Qlikview works. We make selections on certain variables and the changes reflect in the entire application. This happens because through our selection, we have created a set of data which we want to use. In a similar fashion, using Set Analysis feature, we can pre-define the data to be displayed in our charts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Some features and characteristics for Set analysis are:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;It is used to create different selection compared to the current application selections&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Must be used in aggregation function (Sum, Count….).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Expression always begins and ends with curly brackets { }&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG style="color: white; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Example dataset:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;SET ANALYSIS syntax broken down into three components:&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Identifiers:&lt;/SPAN&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="background: white;" width="574"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Identifier&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-left: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Description&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents an empty set, no records&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the set of all the records in the application&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;$&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the records of the current selection&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;$1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the previous selection&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Bookrmark01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;:Represents the set of all records against bookmark ID or the bookmark name&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Examples:&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;In below example, Current year selection is 2012 and previous selection was 2013.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Operators :&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;It&amp;nbsp; works on set identifiers&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="background: white;" width="625"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Operator&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-left: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Operator Name&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-left: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P align="center" style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: center;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Description&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;+&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Union&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns a set of records that belongs to union of sets.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Exclusion&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns records that belong to the first but not the second&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;*&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Intersection&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns records that belong to both of the set identifiers.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid #e6e6e6 1.0pt; border-top: none; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Symmetric Difference&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid #E6E6E6 1.0pt; border-right: solid #E6E6E6 1.0pt; background: #FBFBFB; padding: 1.35pt 3.4pt 1.35pt 3.4pt;" valign="bottom"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Returns a set that belongs to either, but not both of the set identifiers.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;Examples:&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;In below example, I have created a bookmark “BOOKMARK_1” for company selection A, B and C.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Modifiers:&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Modifiers are always in angle brackets &amp;lt;&amp;gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;It consists multiple fields and all fields have selection criteria.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Condition of fields within modifiers bypass the current selection criteria.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-bottom: 6.8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: white;"&gt;Dollar Sign Expansion:&lt;/SPAN&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;If we want to compare current year sale with previous year, previous year sales should reflect values in relation to current selection of year. For example if current selection of year is 2012, previous year should be 2011 and for current selection of year 2013, previous year is 2012.&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #2c2b2b;"&gt; &lt;STRONG&gt;“=Sum ({$&amp;lt;Year = {$ (=Max (Year)-1)} &amp;gt;} Sale) “&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Above expression always returns sale for previous year. Here $ sign (Font color red) is used to evaluate the value for previous year. $ sign is used to evaluate expression and to use variables in set modifiers. If we have variable that holds last year value&lt;/SPAN&gt; &lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Arial','sans-serif';"&gt;(vLASTYEAR)&lt;/STRONG&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;then expression can be written as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Courier New';"&gt;“=Sum ({$vLASTYEAR)} &amp;gt;} Sale) “&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center; background: white;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6.8pt; background: white;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: white;"&gt;Indirect SET ANALYSIS: Function P() and E() &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Let us take a scenario, where we want to show current sales of the companies who had sales last year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Expression should be similar like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Courier New';"&gt;=sum({$&amp;lt;Year={$(=Max(Year))},Company_Name={Companies who had sales last year}&amp;gt; } Sale)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;First we have to identify companies who had sales last year. To fix this problem, we will use function P() that is used to identify values within a field and function E() that exclude values within a field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Finally, we have expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;STRONG style="color: #2c2b2b; font-size: 8.0pt; font-family: 'Courier New';"&gt;=sum({&amp;lt;Year={$(=Max(Year))},Company_Name=P({&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;}Company_Name)&amp;gt;}Sale)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;This post was an example where we have brought out methods to use SET ANALYSIS in Qlikview. Have you used this feature before? If yes, did you find it useful? Do you have more nifty tricks to make Set Analysis more interesting? If not, do you think this article will enable you to use Set Analysis in your next dashboard?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.8pt; margin-bottom: .0001pt; text-align: justify; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Arial','sans-serif'; color: #2c2b2b;"&gt;Do let me know your thoughts on using this feature in QlikView.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 21:27:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Aggr-Max-and-Count-together-in-Set-Analysis/m-p/793636#M1034661</guid>
      <dc:creator />
      <dc:date>2015-01-29T21:27:22Z</dc:date>
    </item>
  </channel>
</rss>

