<?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 Aggr function help in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggr-function-help/m-p/2521049#M106494</link>
    <description>&lt;P&gt;Hello! We have this calculation that works:&lt;/P&gt;&lt;P&gt;if(Sum( {$&amp;lt;GLSubLedg.TransactionType = {"Payroll"}, GLSubLedg.ActualFlag = {'A'}, Currency = {"STAT"},[GLPeriod.PeriodMonthRP]=,[GLPeriod.PeriodNum]={"$(=only(GLPeriod.PeriodNum)-1)"},sum&amp;gt;} GLSubLedg.AmountNR)=0,&lt;/P&gt;&lt;P&gt;IF(Sum( {$&amp;lt;GLSubLedg.TransactionType = {"Payroll"}, GLSubLedg.ActualFlag = {'A'}, Currency = {"STAT"},[GLPeriod.PeriodMonthRP]=,[GLPeriod.PeriodNum]={"$(=only(GLPeriod.PeriodNum))"},GLSubLedg.PAY_Descriptor2={"*"}&amp;gt;} GLSubLedg.AmountNR)&amp;gt;0,&lt;/P&gt;&lt;P&gt;{&amp;lt;[GLPeriod.PeriodMonthRP]=,[GLPeriod.PeriodNum]={"$(=only(GLPeriod.PeriodNum))"}&amp;gt;} count(distinct([GLSubLedg.PAY_Descriptor2])),0),0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but only when the column&amp;nbsp;GLSubLedg.PAY_Descriptor2 is in the table. We would like to remove this column so that the data is summarised, but when we do that, the calculation returns zero. I think we need the AGGR function but everything I have tried has either returned zero, or returns the wrong answer. Can someone help with my syntax?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jun 2025 14:57:38 GMT</pubDate>
    <dc:creator>EllaCymraeg</dc:creator>
    <dc:date>2025-06-12T14:57:38Z</dc:date>
    <item>
      <title>Aggr function help</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-help/m-p/2521049#M106494</link>
      <description>&lt;P&gt;Hello! We have this calculation that works:&lt;/P&gt;&lt;P&gt;if(Sum( {$&amp;lt;GLSubLedg.TransactionType = {"Payroll"}, GLSubLedg.ActualFlag = {'A'}, Currency = {"STAT"},[GLPeriod.PeriodMonthRP]=,[GLPeriod.PeriodNum]={"$(=only(GLPeriod.PeriodNum)-1)"},sum&amp;gt;} GLSubLedg.AmountNR)=0,&lt;/P&gt;&lt;P&gt;IF(Sum( {$&amp;lt;GLSubLedg.TransactionType = {"Payroll"}, GLSubLedg.ActualFlag = {'A'}, Currency = {"STAT"},[GLPeriod.PeriodMonthRP]=,[GLPeriod.PeriodNum]={"$(=only(GLPeriod.PeriodNum))"},GLSubLedg.PAY_Descriptor2={"*"}&amp;gt;} GLSubLedg.AmountNR)&amp;gt;0,&lt;/P&gt;&lt;P&gt;{&amp;lt;[GLPeriod.PeriodMonthRP]=,[GLPeriod.PeriodNum]={"$(=only(GLPeriod.PeriodNum))"}&amp;gt;} count(distinct([GLSubLedg.PAY_Descriptor2])),0),0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but only when the column&amp;nbsp;GLSubLedg.PAY_Descriptor2 is in the table. We would like to remove this column so that the data is summarised, but when we do that, the calculation returns zero. I think we need the AGGR function but everything I have tried has either returned zero, or returns the wrong answer. Can someone help with my syntax?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 14:57:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-help/m-p/2521049#M106494</guid>
      <dc:creator>EllaCymraeg</dc:creator>
      <dc:date>2025-06-12T14:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function help</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-help/m-p/2521061#M106495</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; {$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.TransactionType = {'Payroll'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.ActualFlag = {'A'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Currency = {'STAT'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [GLPeriod.PeriodMonthRP]=,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [GLPeriod.PeriodNum] = {"$(=Only(GLPeriod.PeriodNum)-1)"}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;gt;}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; GLSubLedg.AmountNR&lt;/P&gt;&lt;P&gt;&amp;nbsp; ) = 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Sum(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.TransactionType = {'Payroll'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.ActualFlag = {'A'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Currency = {'STAT'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [GLPeriod.PeriodMonthRP]=,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [GLPeriod.PeriodNum] = {"$(=Only(GLPeriod.PeriodNum))"},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.PAY_Descriptor2 = {"*"}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.AmountNR&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Count(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; distinct&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Only({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.TransactionType = {'Payroll'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.ActualFlag = {'A'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Currency = {'STAT'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [GLPeriod.PeriodMonthRP]=,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [GLPeriod.PeriodNum] = {"$(=Only(GLPeriod.PeriodNum))"},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.PAY_Descriptor2 = {"*"}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;} GLSubLedg.PAY_Descriptor2),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GLSubLedg.PAY_Descripto&lt;/P&gt;&lt;P&gt;r2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 17:19:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-help/m-p/2521061#M106495</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2025-06-12T17:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function help</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-help/m-p/2521100#M106499</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for this, but again, this only works when the column&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;GLSubLedg.PAY_Descriptor2 is in the table. I have tried to add the AGGR function to the two IF statements, but that then returns zero.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 07:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-help/m-p/2521100#M106499</guid>
      <dc:creator>EllaCymraeg</dc:creator>
      <dc:date>2025-06-13T07:44:18Z</dc:date>
    </item>
  </channel>
</rss>

