<?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 Sum value for two distinct dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sum-value-for-two-distinct-dimensions/m-p/2061405#M87069</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a table with two dimensions; Ticket_id and Question_id, and a value; Rating. I want to, in set analysis, sum the Rating. The problem I have is that there can be multiple rows with the same Ticket_id, Question_id and Rating, but I only want to sum Rating for distinct Ticket_id and Type. This is because every row has a different timestamp and each row is counted as a separate support issue.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table" style="width: 440px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/105122i8AE4AB79DF1EC34E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Table" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Table&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So for the above example the results should be a sum of 14 and a count of 4.&lt;/P&gt;
&lt;P&gt;I have tried with the Aggr() function (and it gives me the correct result) but since I need to be able to select a date period and it changes the sum depending on what dates I choose I can't use that. The data is presented in a table with Date as the main dimension shown in weeks/months.&lt;/P&gt;
&lt;P&gt;For the count I'm using the following which works, is there a way to do this for sum?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;count({&amp;lt;Question_id-={''},Rating-={''}&amp;gt;}distinct Ticket_id &amp;amp; Question_id)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2023 08:45:47 GMT</pubDate>
    <dc:creator>fen_one</dc:creator>
    <dc:date>2023-04-18T08:45:47Z</dc:date>
    <item>
      <title>Sum value for two distinct dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-value-for-two-distinct-dimensions/m-p/2061405#M87069</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a table with two dimensions; Ticket_id and Question_id, and a value; Rating. I want to, in set analysis, sum the Rating. The problem I have is that there can be multiple rows with the same Ticket_id, Question_id and Rating, but I only want to sum Rating for distinct Ticket_id and Type. This is because every row has a different timestamp and each row is counted as a separate support issue.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table" style="width: 440px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/105122i8AE4AB79DF1EC34E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Table" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Table&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So for the above example the results should be a sum of 14 and a count of 4.&lt;/P&gt;
&lt;P&gt;I have tried with the Aggr() function (and it gives me the correct result) but since I need to be able to select a date period and it changes the sum depending on what dates I choose I can't use that. The data is presented in a table with Date as the main dimension shown in weeks/months.&lt;/P&gt;
&lt;P&gt;For the count I'm using the following which works, is there a way to do this for sum?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;count({&amp;lt;Question_id-={''},Rating-={''}&amp;gt;}distinct Ticket_id &amp;amp; Question_id)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 08:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-value-for-two-distinct-dimensions/m-p/2061405#M87069</guid>
      <dc:creator>fen_one</dc:creator>
      <dc:date>2023-04-18T08:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sum value for two distinct dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-value-for-two-distinct-dimensions/m-p/2061849#M87096</link>
      <description>&lt;P&gt;Sum(Aggr(Sum(DISTINCT{&amp;lt;IDs={"=Count({&amp;lt;Question_id-={''},Rating-={''}&amp;gt;}DISTINCT Ticket_id &amp;amp; Question_id)&amp;gt;0"}&amp;gt;} Rating), Date , Question_id, Ticket_id))&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 06:09:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-value-for-two-distinct-dimensions/m-p/2061849#M87096</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-04-19T06:09:01Z</dc:date>
    </item>
  </channel>
</rss>

