<?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(aggr(count(distinct id)),date1) for dynamic pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/sum-aggr-count-distinct-id-date1-for-dynamic-pivot-table/m-p/2076143#M88261</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;date1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;field2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;field3&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;id&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;25/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;AAA&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;111&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;25/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;AAA&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;111&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;26/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;BBB&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;111&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;26/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;AAA&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;222&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="24px"&gt;26/05/2023&lt;/TD&gt;
&lt;TD height="24px"&gt;BBB&lt;/TD&gt;
&lt;TD height="24px"&gt;111&lt;/TD&gt;
&lt;TD height="24px"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a pivot table with &lt;STRONG&gt;date1&lt;/STRONG&gt;, &lt;STRONG&gt;field2&lt;/STRONG&gt; and &lt;STRONG&gt;field3&lt;/STRONG&gt; as columns, and I want a measure that gets the sum of distinct &lt;STRONG&gt;id&lt;/STRONG&gt;'s per &lt;EM&gt;date1&lt;/EM&gt;. I've tried with&amp;nbsp;&lt;EM&gt;sum(aggr(count(distinct id)),date1)&lt;/EM&gt;, but it doesn't work for the rows of &lt;EM&gt;field2&lt;/EM&gt; and &lt;EM&gt;field3&lt;/EM&gt;, because they have to be included in the measure. The problem is that depending on the level of dimension, the measure should be one or another.&lt;/P&gt;
&lt;P&gt;For example, for &lt;EM&gt;field2&amp;nbsp;&lt;/EM&gt; it would be&amp;nbsp;&lt;EM&gt;sum(aggr(count(distinct id)),date1, field2)&lt;/EM&gt;, and for &lt;EM&gt;field3,&amp;nbsp;sum(aggr(count(distinct id)),date1, field2, field3).&amp;nbsp;&lt;/EM&gt;In the pivot table the dimensions are dynamic, the user can move the order of then, so the measure would also change.&lt;/P&gt;
&lt;P&gt;The count(distinct id) of all data is 3, but the&amp;nbsp;&lt;EM&gt;sum(aggr(count(distinct id)),date1)&lt;/EM&gt;&amp;nbsp; is 2+3=5.&lt;/P&gt;
&lt;P&gt;How can I write the measure to be the same for all levels of the pivot table?&lt;/P&gt;</description>
    <pubDate>Thu, 25 May 2023 10:20:37 GMT</pubDate>
    <dc:creator>amaaiia</dc:creator>
    <dc:date>2023-05-25T10:20:37Z</dc:date>
    <item>
      <title>sum(aggr(count(distinct id)),date1) for dynamic pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/sum-aggr-count-distinct-id-date1-for-dynamic-pivot-table/m-p/2076143#M88261</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;date1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;field2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;field3&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;id&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;25/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;AAA&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;111&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;25/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;AAA&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;111&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;26/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;BBB&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;111&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;26/05/2023&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;AAA&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;222&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="24px"&gt;26/05/2023&lt;/TD&gt;
&lt;TD height="24px"&gt;BBB&lt;/TD&gt;
&lt;TD height="24px"&gt;111&lt;/TD&gt;
&lt;TD height="24px"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a pivot table with &lt;STRONG&gt;date1&lt;/STRONG&gt;, &lt;STRONG&gt;field2&lt;/STRONG&gt; and &lt;STRONG&gt;field3&lt;/STRONG&gt; as columns, and I want a measure that gets the sum of distinct &lt;STRONG&gt;id&lt;/STRONG&gt;'s per &lt;EM&gt;date1&lt;/EM&gt;. I've tried with&amp;nbsp;&lt;EM&gt;sum(aggr(count(distinct id)),date1)&lt;/EM&gt;, but it doesn't work for the rows of &lt;EM&gt;field2&lt;/EM&gt; and &lt;EM&gt;field3&lt;/EM&gt;, because they have to be included in the measure. The problem is that depending on the level of dimension, the measure should be one or another.&lt;/P&gt;
&lt;P&gt;For example, for &lt;EM&gt;field2&amp;nbsp;&lt;/EM&gt; it would be&amp;nbsp;&lt;EM&gt;sum(aggr(count(distinct id)),date1, field2)&lt;/EM&gt;, and for &lt;EM&gt;field3,&amp;nbsp;sum(aggr(count(distinct id)),date1, field2, field3).&amp;nbsp;&lt;/EM&gt;In the pivot table the dimensions are dynamic, the user can move the order of then, so the measure would also change.&lt;/P&gt;
&lt;P&gt;The count(distinct id) of all data is 3, but the&amp;nbsp;&lt;EM&gt;sum(aggr(count(distinct id)),date1)&lt;/EM&gt;&amp;nbsp; is 2+3=5.&lt;/P&gt;
&lt;P&gt;How can I write the measure to be the same for all levels of the pivot table?&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 10:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-aggr-count-distinct-id-date1-for-dynamic-pivot-table/m-p/2076143#M88261</guid>
      <dc:creator>amaaiia</dc:creator>
      <dc:date>2023-05-25T10:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: sum(aggr(count(distinct id)),date1) for dynamic pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/sum-aggr-count-distinct-id-date1-for-dynamic-pivot-table/m-p/2076481#M88277</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;date1=, field2=, field3=, id=&amp;gt;} Aggr(Count(DISTINCT id), date1, field2, field3))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 17:30:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-aggr-count-distinct-id-date1-for-dynamic-pivot-table/m-p/2076481#M88277</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2023-05-25T17:30:11Z</dc:date>
    </item>
  </channel>
</rss>

