<?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: AGGR question in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1951264#M78400</link>
    <description>&lt;P&gt;Hi, understood.&lt;/P&gt;
&lt;P&gt;Usually aggr() is used to make additonal group to the existing dimensions, when used in the opposite way, like this when all the parameters of aggr(year and month) exists as dimension and there is an additional dimension, it only shows by default the value on one of the rows.&lt;/P&gt;
&lt;P&gt;To do this it will be better to use the TOTAl qualifier wich is used to ignore dimension, in this case this expression can be used:&amp;nbsp;Sum(TOTAL &amp;lt;Year, Month&amp;gt; [T_minutes]).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jul 2022 10:18:41 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2022-07-04T10:18:41Z</dc:date>
    <item>
      <title>AGGR question</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1950616#M78327</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I have this table in my data model:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="14.285714285714286%"&gt;EmployeeID&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;DateID&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;T_minutes&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;A_Minutes&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;A_Code&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;Year&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;Month&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="14.285714285714286%"&gt;03&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01/01/2022&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="14.285714285714286%"&gt;03&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;02/01/2022&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="14.285714285714286%"&gt;03&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;02/01/2022&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;20&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;A1&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="14.285714285714286%"&gt;03&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;02/01/2022&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;50&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;A2&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="14.285714285714286%"&gt;04&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01/01/2022&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="14.285714285714286%"&gt;04&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;02/01/2022&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;-&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;01&lt;/TD&gt;
&lt;TD width="14.285714285714286%"&gt;2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would need to summarize the T_minutes and A_minutes per Year, Month and A_Code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this pivot table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="salto_0-1656660812916.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83114i16A934B97AF24324/image-size/medium?v=v2&amp;amp;px=400" role="button" title="salto_0-1656660812916.png" alt="salto_0-1656660812916.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, the &lt;EM&gt;T_minutes&lt;/EM&gt; column has no values for some of the A_codes. It works fine if I collapse the columns.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="salto_1-1656661121588.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83118iF7876445314FCD7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="salto_1-1656661121588.png" alt="salto_1-1656661121588.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Formulas are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A_minutes =Sum ([A_minutes])&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;T_minutes =&amp;nbsp;&lt;STRONG&gt;sum(aggr(Sum ([T_minutes]), Year, Month))&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to reflect the&lt;STRONG&gt; total T_minutes per Year and Month in the second column,&lt;/STRONG&gt; but I cannot find the correct formula to do this. As you can see, some values are null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can this be achieved using AGGR with the above data model?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 07:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1950616#M78327</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2022-07-01T07:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR question</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1950989#M78372</link>
      <description>&lt;P&gt;Hi, I can't full understand what are you trying to achieve, can you post an example of the result you want?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2022 09:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1950989#M78372</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-07-02T09:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR question</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1951261#M78399</link>
      <description>&lt;P&gt;Hello Rubén,&lt;/P&gt;
&lt;P&gt;many thanks for your answer.&lt;/P&gt;
&lt;P&gt;This is what I get now if the chart is unexpanded: total A_minutes and T_minutes per Year and Month. Correct.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="salto_2-1656928781191.png" style="width: 734px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83239i3D5351D4B2847AE4/image-dimensions/734x239?v=v2" width="734" height="239" role="button" title="salto_2-1656928781191.png" alt="salto_2-1656928781191.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But when the Month is expanded and the Code is shown, this is what I get:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="salto_3-1656928869008.png" style="width: 724px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83240iB5EF6CE89BE79A84/image-dimensions/724x322?v=v2" width="724" height="322" role="button" title="salto_3-1656928869008.png" alt="salto_3-1656928869008.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would like the T_minutes column to show the total T_Minutes (2.287.748) for that Year-Month in every row, and not zeroes or the whole value in B2 (or any other code).&lt;/P&gt;
&lt;P&gt;This is what we need:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="salto_4-1656929215236.png" style="width: 731px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83241i59E1B879222D3B94/image-dimensions/731x329?v=v2" width="731" height="329" role="button" title="salto_4-1656929215236.png" alt="salto_4-1656929215236.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please let me know if my question is clear.&lt;/P&gt;
&lt;P&gt;Many thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 10:11:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1951261#M78399</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2022-07-04T10:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR question</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1951264#M78400</link>
      <description>&lt;P&gt;Hi, understood.&lt;/P&gt;
&lt;P&gt;Usually aggr() is used to make additonal group to the existing dimensions, when used in the opposite way, like this when all the parameters of aggr(year and month) exists as dimension and there is an additional dimension, it only shows by default the value on one of the rows.&lt;/P&gt;
&lt;P&gt;To do this it will be better to use the TOTAl qualifier wich is used to ignore dimension, in this case this expression can be used:&amp;nbsp;Sum(TOTAL &amp;lt;Year, Month&amp;gt; [T_minutes]).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 10:18:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1951264#M78400</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-07-04T10:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR question</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1951322#M78405</link>
      <description>&lt;P&gt;Hello Rubén,&lt;/P&gt;
&lt;P&gt;thanks a lot, this worked like a charm.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 12:18:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-question/m-p/1951322#M78405</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2022-07-04T12:18:31Z</dc:date>
    </item>
  </channel>
</rss>

