<?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: Sum Aggr with condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392693#M32086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you say 'it didn't work', can you please detail what you see and what you expect to see?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, the usage of set analysis in combination with advanced aggregation is explained in Henric's blog post I've linked to in my first answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check that the set analysis itself is working fine, for example check using a table chart with TransID and TransDate as dimensions and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SUM({$&amp;lt;[Date_ID.autoCalendar.Year]={'2016'}&amp;gt;}&amp;nbsp; Points)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;as expression that the filter works as expected. There are / were some issues with the automatic generated calendar fields and set analysis.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2017 09:44:15 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2017-10-04T09:44:15Z</dc:date>
    <item>
      <title>Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392684#M32077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I use a condition on the following expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(AGGR(SUM(DISTINCT Points), TransID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the condition i want to apply is {$&amp;lt;[Date_ID.autoCalendar.Year]={'2016'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried like this:&lt;/P&gt;&lt;P&gt;SUM({$&amp;lt;[Date_ID.autoCalendar.Year]={'2016'}&amp;gt;} AGGR(SUM(DISTINCT Points), TransID)) &lt;/P&gt;&lt;P&gt;but it didn't work.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Miguel Cunha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:13:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392684#M32077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392685#M32078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4669"&gt;Set Analysis in the Aggr function&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 08:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392685#M32078</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-10-04T08:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392686#M32079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM(DISTINCT {$&amp;lt;[Date_ID.autoCalendar.Year]={'2016'}&amp;gt;}&amp;nbsp; AGGR(Points,TransID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 08:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392686#M32079</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-04T08:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392687#M32080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your anwser but that's not the result i'm looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to Sum the points but the points for each TransID can only be counted once and then I want to apply the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help explaining, I have a Table (QVD) with my sales. Each sale has a TransID. However a sale has multiple rows, one for every product sold in that especific sale and I only want to count the points for that sale once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392687#M32080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T09:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392688#M32081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Share some data to have a look, May be you have to use count.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392688#M32081</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-04T09:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392689#M32082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data I'm working with is confidencial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an excel with some sample of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I told you, for each TransID, I just want to sum the points once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do that I can use SUM(AGGR(SUM( DISTINCT Points), TransID)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how can I filter the sum to the year 2016?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392689#M32082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T09:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392690#M32083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the attached may be this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:30:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392690#M32083</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-04T09:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392691#M32084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anand, sorry fot this question but once I'm using Qlik Sense, can I open that file you sent? How can I do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392691#M32084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T09:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392692#M32085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this code though change the drive location and source&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD TransID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID_Line, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Points, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,Year(Date) as Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expre:-=SUM(DISTINCT&amp;nbsp; {$&amp;lt;Year={'2016'}&amp;gt;} AGGR(Points,TransID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:42:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392692#M32085</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-04T09:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392693#M32086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you say 'it didn't work', can you please detail what you see and what you expect to see?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, the usage of set analysis in combination with advanced aggregation is explained in Henric's blog post I've linked to in my first answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check that the set analysis itself is working fine, for example check using a table chart with TransID and TransDate as dimensions and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SUM({$&amp;lt;[Date_ID.autoCalendar.Year]={'2016'}&amp;gt;}&amp;nbsp; Points)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;as expression that the filter works as expected. There are / were some issues with the automatic generated calendar fields and set analysis.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392693#M32086</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-10-04T09:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392694#M32087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Attaching the Output&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="OP9.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/178558_OP9.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392694#M32087</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-04T09:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392695#M32088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I'm trying to calculate this in dashboard, in a table, with the Expression Editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I said "it didn't work" because the result was not correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 09:52:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392695#M32088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T09:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Aggr with condition</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392696#M32089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anand, Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tryed it like this =SUM( {$&amp;lt;Year={'2016'}&amp;gt;} AGGR(distinct Points, TransID))&lt;/P&gt;&lt;P&gt;and I think it gave me the correct result (I'm going to check with sql right now).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 10:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Aggr-with-condition/m-p/1392696#M32089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T10:24:09Z</dc:date>
    </item>
  </channel>
</rss>

