<?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: optimize expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160547#M94139</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41280"&gt;@paulwalker&lt;/a&gt;&amp;nbsp;In My opinion, you don't need two expressions and two times aggregate. Rather you can perhaps look this?&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Round(Aggr(SUM({&amp;lt;Type={'PRIMARY'}, fill_flag={1}, Month={$(=MAX(Month))}&lt;FONT color="#FF0000"&gt;, Name={'ABC'}, Flag={'ALL'}&lt;/FONT&gt;&amp;gt;} Sales)/100,ID, Pno, description, Sales, rank), 0.01)&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 12:55:40 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2024-01-11T12:55:40Z</dc:date>
    <item>
      <title>optimize expression</title>
      <link>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160508#M94134</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;
&lt;P&gt;I need to optimize the expressions, like same expressions I have all the months.&lt;/P&gt;
&lt;P&gt;ROUND(SUM(agGr(&lt;BR /&gt;ONLY({&amp;lt;Type={'PRIMARY'},fill_flag={1},Month={$(=MAX(Month))}&amp;gt;}Sales)/100,&lt;BR /&gt;ID, Pno, description, Sales, rank))&lt;BR /&gt;+&lt;BR /&gt;SUM(agGr(&lt;BR /&gt;ONLY({&amp;lt;Month={$(=MAX(Month))},Name={'ABC'}, Flag={'ALL'}&amp;gt;}Sales)/100,&lt;BR /&gt;ID, Pno, description, Sales, rank)), 0.01)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;chart taking to more time to display - is there any way to optimize expression?&lt;/P&gt;
&lt;P&gt;Thanks in Advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 12:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160508#M94134</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2024-01-11T12:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: optimize expression</title>
      <link>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160518#M94135</link>
      <description>&lt;P&gt;can you try by creating the flag in load script like below :&lt;/P&gt;
&lt;P&gt;if(&lt;SPAN&gt;Type='PRIMARY'&amp;nbsp; and fill_flag=1,1,0) as flag1,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(Name='ABC' and&amp;nbsp; Flag='ALL',1,0) as flag2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;use below set analysis logic:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ROUND(SUM(agGr(&lt;BR /&gt;ONLY({&amp;lt;flag1={1},Month={$(=MAX(Month))}&amp;gt;}Sales)/100,&lt;BR /&gt;ID, Pno, description, Sales, rank))&lt;BR /&gt;+&lt;BR /&gt;SUM(agGr(&lt;BR /&gt;ONLY({&amp;lt;Month={$(=MAX(Month))}, flag2={1}&amp;gt;}Sales)/100,&lt;BR /&gt;ID, Pno, description, Sales, rank)), 0.01)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 12:26:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160518#M94135</guid>
      <dc:creator>anat</dc:creator>
      <dc:date>2024-01-11T12:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: optimize expression</title>
      <link>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160547#M94139</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41280"&gt;@paulwalker&lt;/a&gt;&amp;nbsp;In My opinion, you don't need two expressions and two times aggregate. Rather you can perhaps look this?&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Round(Aggr(SUM({&amp;lt;Type={'PRIMARY'}, fill_flag={1}, Month={$(=MAX(Month))}&lt;FONT color="#FF0000"&gt;, Name={'ABC'}, Flag={'ALL'}&lt;/FONT&gt;&amp;gt;} Sales)/100,ID, Pno, description, Sales, rank), 0.01)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 12:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160547#M94139</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2024-01-11T12:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: optimize expression</title>
      <link>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160556#M94140</link>
      <description>&lt;P&gt;One expression is PRIMARY sales and another expression is NON-PRIMARY sales -&lt;/P&gt;
&lt;P&gt;would it work above expression ?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:06:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160556#M94140</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2024-01-11T13:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: optimize expression</title>
      <link>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160568#M94142</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41280"&gt;@paulwalker&lt;/a&gt; In that case If you want to run both expression to the addition of non-sales. Because Aggr() usually kills the performance and on that you have used Only (). Not sure of the intent here. Maybe this still work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The correct expression,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ROUND(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Aggr((&lt;/STRONG&gt;&lt;/FONT&gt;SUM({&amp;lt;Type={'PRIMARY'},fill_flag={1},Month={$(=MAX(Month))}&amp;gt;}Sales)/100&lt;BR /&gt;+&lt;BR /&gt;SUM({&amp;lt;Month={$(=MAX(Month))},Name={'ABC'}, Flag={'ALL'}&amp;gt;}Sales)/100&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;,&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ID, Pno, description, Sales, rank)&lt;/FONT&gt;&lt;/STRONG&gt;,0.01)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/optimize-expression/m-p/2160568#M94142</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2024-01-11T13:24:03Z</dc:date>
    </item>
  </channel>
</rss>

