<?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 Pivot and Aggr functions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-and-Aggr-functions/m-p/1000992#M976871</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;Good afternoon! I have a two-dimensional pivot table with AGGR, IF AND COUNT expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two dimensions are Gsite and GFunction. The Finance 'Function' is located at two Sites (CRS, DLG) and I wanted to see the performance of 'Finance' at both the sites. I am using the following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;nodistinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'10'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=3 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=6'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)=0, 'Outstanding',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;gt;=7 &amp;lt;=9'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;), 'Good',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=3'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=3, 'Inadequate',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=6'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=3, 'Requires Improvement',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=3'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=2, 'Requires Improvement', 'Good'))))), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GFunction&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GDomain&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I DO NOT apply any filters, I am getting the same result for both the sites. Please see screen shot below. This is wrong because CRS and DLG sites have different values. &lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97040_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;When I apply a filter CRS or DLG, the value changes. see screen shot below.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/97041_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please tell me what is going wrong and how can I show the correct values for both the Sites without applying the filter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the QVW file and the spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2015 12:12:43 GMT</pubDate>
    <dc:creator>infock12</dc:creator>
    <dc:date>2015-08-26T12:12:43Z</dc:date>
    <item>
      <title>Pivot and Aggr functions</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-and-Aggr-functions/m-p/1000992#M976871</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;Good afternoon! I have a two-dimensional pivot table with AGGR, IF AND COUNT expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two dimensions are Gsite and GFunction. The Finance 'Function' is located at two Sites (CRS, DLG) and I wanted to see the performance of 'Finance' at both the sites. I am using the following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;nodistinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'10'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=3 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=6'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)=0, 'Outstanding',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;gt;=7 &amp;lt;=9'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;), 'Good',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=3'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=3, 'Inadequate',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=6'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=3, 'Requires Improvement',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GRating&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {'&amp;lt;=3'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GQuestions&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=2, 'Requires Improvement', 'Good'))))), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GFunction&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;GDomain&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I DO NOT apply any filters, I am getting the same result for both the sites. Please see screen shot below. This is wrong because CRS and DLG sites have different values. &lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97040_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;When I apply a filter CRS or DLG, the value changes. see screen shot below.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/97041_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please tell me what is going wrong and how can I show the correct values for both the Sites without applying the filter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the QVW file and the spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 12:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-and-Aggr-functions/m-p/1000992#M976871</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2015-08-26T12:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot and Aggr functions</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-and-Aggr-functions/m-p/1000993#M976872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include the GSite in Aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(nodistinct if(count({&amp;lt;GRating = {'10'}&amp;gt;} GQuestions)&amp;gt;=3 and count({&amp;lt;GRating = {'&amp;lt;=6'}&amp;gt;}GQuestions)=0, 'Outstanding',&lt;/P&gt;&lt;P&gt;if(count({&amp;lt;GRating = {'&amp;gt;=7 &amp;lt;=9'}&amp;gt;}GQuestions)=count(GQuestions), 'Good',&lt;/P&gt;&lt;P&gt;if(count({&amp;lt;GRating = {'&amp;lt;=3'}&amp;gt;}GQuestions)&amp;gt;=3, 'Inadequate',&lt;/P&gt;&lt;P&gt;if(count({&amp;lt;GRating = {'&amp;lt;=6'}&amp;gt;}GQuestions)&amp;gt;=3, 'Requires Improvement',&lt;/P&gt;&lt;P&gt;if(count({&amp;lt;GRating = {'&amp;lt;=3'}&amp;gt;}GQuestions)&amp;gt;=2, 'Requires Improvement',&amp;nbsp; 'Good'))))), GFunction, GDomain,GSite)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 12:15:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-and-Aggr-functions/m-p/1000993#M976872</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2015-08-26T12:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot and Aggr functions</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-and-Aggr-functions/m-p/1000994#M976873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, thanks Kaushik!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 12:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-and-Aggr-functions/m-p/1000994#M976873</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2015-08-26T12:45:58Z</dc:date>
    </item>
  </channel>
</rss>

