<?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 Set Analysis Issue in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Issue/m-p/1874628#M72126</link>
    <description>&lt;P&gt;I have a field &lt;STRONG&gt;[Max_Invoice_Date_GMT_Updated]&lt;/STRONG&gt; that has dates stored for each &lt;STRONG&gt;[Company_Code]&lt;/STRONG&gt; as shown below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="risabhroy_03_0-1640256861448.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69132i8A77D3160334FEDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="risabhroy_03_0-1640256861448.png" alt="risabhroy_03_0-1640256861448.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now, I want to sum my &lt;STRONG&gt;[Quantity]&lt;/STRONG&gt; where &lt;STRONG&gt;[Invoice_Date_GMT_Updated] =&amp;nbsp;[Max_Invoice_Date_GMT_Updated]&lt;/STRONG&gt; using set analysis.&lt;/P&gt;
&lt;P&gt;I wrote -&amp;nbsp; &amp;nbsp; &amp;nbsp;Sum({&amp;lt;[Invoice_Date_GMT_Updated] = p(Max_Invoice_Date_GMT_Updated)&amp;gt;}Quantity)&lt;/P&gt;
&lt;P&gt;but unfortunately, I am not getting the correct values. I don't want to use it because my data is too large and it might affect my performance.&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Dec 2021 10:58:01 GMT</pubDate>
    <dc:creator>risabhroy_03</dc:creator>
    <dc:date>2021-12-23T10:58:01Z</dc:date>
    <item>
      <title>Set Analysis Issue</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Issue/m-p/1874628#M72126</link>
      <description>&lt;P&gt;I have a field &lt;STRONG&gt;[Max_Invoice_Date_GMT_Updated]&lt;/STRONG&gt; that has dates stored for each &lt;STRONG&gt;[Company_Code]&lt;/STRONG&gt; as shown below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="risabhroy_03_0-1640256861448.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69132i8A77D3160334FEDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="risabhroy_03_0-1640256861448.png" alt="risabhroy_03_0-1640256861448.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now, I want to sum my &lt;STRONG&gt;[Quantity]&lt;/STRONG&gt; where &lt;STRONG&gt;[Invoice_Date_GMT_Updated] =&amp;nbsp;[Max_Invoice_Date_GMT_Updated]&lt;/STRONG&gt; using set analysis.&lt;/P&gt;
&lt;P&gt;I wrote -&amp;nbsp; &amp;nbsp; &amp;nbsp;Sum({&amp;lt;[Invoice_Date_GMT_Updated] = p(Max_Invoice_Date_GMT_Updated)&amp;gt;}Quantity)&lt;/P&gt;
&lt;P&gt;but unfortunately, I am not getting the correct values. I don't want to use it because my data is too large and it might affect my performance.&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 10:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Issue/m-p/1874628#M72126</guid>
      <dc:creator>risabhroy_03</dc:creator>
      <dc:date>2021-12-23T10:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Issue</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Issue/m-p/1874663#M72128</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try to do this at script level like below to avoid performance hit on the application&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;MAP:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;mapping load&lt;/P&gt;
&lt;P&gt;company_code, max(&lt;STRONG&gt;[Invoice_Date_GMT_Updated])&amp;nbsp; as [Invoice_Date_GMT_Updated]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;from CompanyTable;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Company:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Load *, if ([Invoice_Date_GMT_Updated] =MaxDate,1,0) as &lt;STRONG&gt;Max_Flag&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;Load *,&lt;/P&gt;
&lt;P&gt;applymap('MAP',company_code ,'N/A') as &lt;STRONG&gt;MaxDate&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;from CompanyTable;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chart expression: &lt;STRONG&gt;sum({&amp;lt;Max_Flag={'1'}&amp;gt;}Quantity)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sasi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 12:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Issue/m-p/1874663#M72128</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2021-12-23T12:16:34Z</dc:date>
    </item>
  </channel>
</rss>

