<?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: Set Analysis and Count Distinct Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416971#M483952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes so in my pivot I want to create an expression that counts only EmpID 1 and 3 and excludes EmpID 2 when the dimension is Grade - B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 May 2013 20:25:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-28T20:25:36Z</dc:date>
    <item>
      <title>Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416965#M483946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the attached pivot I would like to create a expression that counts by grade employees present in both time periods and with the same grade in both periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For grade B the correct answer should be 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 19:37:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416965#M483946</guid>
      <dc:creator />
      <dc:date>2013-05-28T19:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416966#M483947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So do you need to see 2009 in one column and 2010 in another&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416966#M483947</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-05-28T20:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416967#M483948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this for 2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41763" class="jive-image" alt="2009.png" src="https://community.qlik.com/legacyfs/online/41763_2009.png" /&gt;&lt;/P&gt;&lt;P&gt;And then this for 2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41764" class="jive-image" alt="2010.png" src="https://community.qlik.com/legacyfs/online/41764_2010.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:11:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416967#M483948</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-05-28T20:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416968#M483949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I would like to see one column that counts distinct empID's with same grade in both time periods.And I want to add the grade dimension to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So right now for grade B it is counting EMP ID&amp;nbsp; 1,2 and 3 when it should be counting only EmpID 1 and 3 that fits the above criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:13:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416968#M483949</guid>
      <dc:creator />
      <dc:date>2013-05-28T20:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416969#M483950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The condition I want to apply in the expression is employees present in both time periods and employees with same grade in both time periods.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416969#M483950</guid>
      <dc:creator />
      <dc:date>2013-05-28T20:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416970#M483951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this &lt;IMG __jive_id="41765" class="jive-image-thumbnail jive-image" onclick="" alt="Table.png" src="https://community.qlik.com/legacyfs/online/41765_Table.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416970#M483951</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-05-28T20:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416971#M483952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes so in my pivot I want to create an expression that counts only EmpID 1 and 3 and excludes EmpID 2 when the dimension is Grade - B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:25:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416971#M483952</guid>
      <dc:creator />
      <dc:date>2013-05-28T20:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416972#M483953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis is evaluated once per chart, not per dimenion line, so considering the dimension value of Grade in your set expression is not feasible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count(distinct aggr( if( count(distinct Year) = 2, EmpID),EmpID,Grade))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416972#M483953</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-28T20:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416973#M483954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Swuehl, however my data model runs into multiple years and I would like to include the input variables in the expression and try calculating the same expression for different time period selection from the front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416973#M483954</guid>
      <dc:creator />
      <dc:date>2013-05-28T20:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416974#M483955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I am not a pro, do you need it like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41766" class="jive-image" alt="Test.png" src="https://community.qlik.com/legacyfs/online/41766_Test.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, I used the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41767" class="jive-image-thumbnail jive-image" onclick="" alt="DISTINCT_YEAR.png" src="https://community.qlik.com/legacyfs/online/41767_DISTINCT_YEAR.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416974#M483955</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-05-28T20:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416975#M483956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alan for your help, I am looking for something similar to the below expression from Swuehl.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416975#M483956</guid>
      <dc:creator />
      <dc:date>2013-05-28T20:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416976#M483957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't specified the Years in the expression, just the requirement to return any EmpID with same Grade in two years. So if you select a different set of years, it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I've misunderstood your requirement please update your data sample and your requested output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:47:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416976#M483957</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-28T20:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416977#M483958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attached, I would like to pass the input variables to define From and To time periods in which this pivot will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to specify years in the same expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 20:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416977#M483958</guid>
      <dc:creator />
      <dc:date>2013-05-28T20:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416978#M483959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You say the answer must be 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there are 3 Distinct EmpID that had a Grade B between 2009 and 2010&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 21:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416978#M483959</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-05-28T21:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416979#M483960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alan - The expression should work at the grade level and count distinct employees only when the following criteria is met - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Employees should be present in both time periods and with same grade in both periods.EMP ID 1 and 3 are the only ones that satisfy the condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 21:06:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416979#M483960</guid>
      <dc:creator />
      <dc:date>2013-05-28T21:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416980#M483961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( distinct aggr( if( count({&amp;lt;Year = {"&amp;gt;=$(FromPeriod)&amp;lt;=$(To)"}&amp;gt;}distinct Year) = 2, EmpID),EmpID,Grade))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 21:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416980#M483961</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-28T21:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Count Distinct Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416981#M483962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is perfect, thank you very much Swuehl. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will keep you posted if I find any issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 21:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Count-Distinct-Expression/m-p/416981#M483962</guid>
      <dc:creator />
      <dc:date>2013-05-28T21:13:54Z</dc:date>
    </item>
  </channel>
</rss>

