<?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: Moving AGGR Calculation from front-end to backend in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Moving-AGGR-Calculation-from-front-end-to-backend/m-p/2007363#M83355</link>
    <description>&lt;P&gt;Hi Benjamin,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much , I really helpful.&lt;/P&gt;
&lt;P&gt;--&lt;STRONG&gt;Mayank&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2022 05:42:56 GMT</pubDate>
    <dc:creator>Aryasmank</dc:creator>
    <dc:date>2022-11-22T05:42:56Z</dc:date>
    <item>
      <title>Moving AGGR Calculation from front-end to backend</title>
      <link>https://community.qlik.com/t5/App-Development/Moving-AGGR-Calculation-from-front-end-to-backend/m-p/2007028#M83326</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to move my AGGR calculation to backend from from-end.&lt;/P&gt;
&lt;P&gt;Expression : &lt;STRONG&gt;aggr(count({&amp;lt;status={'Valid'}, ROD={"$(Date(max(ROD)))"}&amp;gt;} distinct id_pd), Date)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;there are two tables :&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;table1: &amp;nbsp;&lt;/STRONG&gt; columns --&amp;gt; &amp;nbsp;id, ROD, &amp;nbsp;id_pd&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;table2:&amp;nbsp;&lt;/STRONG&gt; columns --&amp;gt; id, Date, status&lt;/P&gt;
&lt;P&gt;how this expression can be done in load script .&lt;/P&gt;
&lt;P&gt;--&lt;STRONG&gt;Mayank&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Moving-AGGR-Calculation-from-front-end-to-backend/m-p/2007028#M83326</guid>
      <dc:creator>Aryasmank</dc:creator>
      <dc:date>2022-11-21T13:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Moving AGGR Calculation from front-end to backend</title>
      <link>https://community.qlik.com/t5/App-Development/Moving-AGGR-Calculation-from-front-end-to-backend/m-p/2007039#M83328</link>
      <description>&lt;P&gt;Hi Mayank!&lt;/P&gt;
&lt;P&gt;You need to first join both sources in your script, before you can aggregate data using "group by".&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;AGGR_prep:
load * from table1; // LOAD table1 from source

left join(AGGR_prep) // Might need other join() operation depending on use-case
load * from table2; // join table2 from source

// generate aggregated data
AGGR_table:
load
  Date,
  count(distinct id_pd) as id_pd_count
resident
  AGGR_prep
group by
  Date
;

// get rid of helper table
drop table AGGR_prep;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;U&gt;Be aware of the following:&lt;/U&gt; &lt;BR /&gt;By generating your count in the Qlik script you can only use the data granularity you used in the generation process (in our example Date). &lt;BR /&gt;Let's say you add the dimension "Department" to one of your tables. The current script I provided would not discriminate between different Departments, so when the end user makes a Department selection, the numbers would not change. This needs to be kept in mind for future changes of your application.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Benjamin&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Moving-AGGR-Calculation-from-front-end-to-backend/m-p/2007039#M83328</guid>
      <dc:creator>starke_be-terna</dc:creator>
      <dc:date>2022-11-21T13:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Moving AGGR Calculation from front-end to backend</title>
      <link>https://community.qlik.com/t5/App-Development/Moving-AGGR-Calculation-from-front-end-to-backend/m-p/2007363#M83355</link>
      <description>&lt;P&gt;Hi Benjamin,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much , I really helpful.&lt;/P&gt;
&lt;P&gt;--&lt;STRONG&gt;Mayank&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 05:42:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Moving-AGGR-Calculation-from-front-end-to-backend/m-p/2007363#M83355</guid>
      <dc:creator>Aryasmank</dc:creator>
      <dc:date>2022-11-22T05:42:56Z</dc:date>
    </item>
  </channel>
</rss>

