<?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 Chart Aggr Problem in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Chart-Aggr-Problem/m-p/1607564#M45075</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have this table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik-table.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/16217i056E47E9643540A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="qlik-table.png" alt="qlik-table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where&lt;/P&gt;&lt;P&gt;1 Loja is the Store&lt;/P&gt;&lt;P&gt;2 Produto is the Product&lt;/P&gt;&lt;P&gt;3 # Vendida is the quantity sold&lt;/P&gt;&lt;P&gt;4 # Vendida TOTAL LOJA is the total quantity grouped by Loja&lt;/P&gt;&lt;P&gt;5 % Vendida Loja / Total is the total quantity sold of each Loja divided by Total Quantity Sold (24.377.848,14) - Means the participation of each Loja (store) from all sales (# Vendida)&lt;/P&gt;&lt;P&gt;6 # Estoque is the stock quantity&lt;/P&gt;&lt;P&gt;7 # Antigo Est. Padrão is the "default" stock quantity of each Loja should have&lt;/P&gt;&lt;P&gt;8 # Antigo Est. Padrão TOTAL PROD is the total of the prior column grouped by Produto&lt;/P&gt;&lt;P&gt;9 % Antigo Est. Padrão PROD / TOTAL is the value of # Antigo Est. Padrão divided by the Total grouped by Produto&lt;/P&gt;&lt;P&gt;10 %Var The difference between columns 5 and 9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The % Var column I calc like this:&lt;/P&gt;&lt;P&gt;if(value10 &amp;gt;= value5, (value10/value5)-1, (value5/value10)-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the table correctly using set analysis.&lt;/P&gt;&lt;P&gt;But I need a chart grouped by Loja counting each time the column 10 %Var is bigger than 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got errors like "nested aggregation not allowed". So I changed every formula to use aggr instead and the table is correctly again. But I can not get the chart to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 4 formula:&lt;/P&gt;&lt;P&gt;aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 5 formula:&lt;/P&gt;&lt;P&gt;aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 8 formula:&lt;/P&gt;&lt;P&gt;aggr(nodistinct sum(all&amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 9 formula:&lt;/P&gt;&lt;P&gt;sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)) / aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 10 formula:&lt;/P&gt;&lt;P&gt;if(&lt;BR /&gt;(aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0))) &amp;gt;=&lt;BR /&gt;(sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0))/aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto))&lt;BR /&gt;,&lt;BR /&gt;(aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0))) /&lt;BR /&gt;(sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0))/aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto))&lt;BR /&gt;,&lt;BR /&gt;(sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0))/aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto)) /&lt;BR /&gt;(aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0)))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I show a chart (pie) with only one dimension (Loja) and a metric showing the total number of times where the column 10 formula is greater than 5 (500%)?&lt;/P&gt;&lt;P&gt;I can send the qvf file if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 14:18:40 GMT</pubDate>
    <dc:creator>brunolovatti</dc:creator>
    <dc:date>2019-07-30T14:18:40Z</dc:date>
    <item>
      <title>Chart Aggr Problem</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-Aggr-Problem/m-p/1607564#M45075</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have this table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik-table.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/16217i056E47E9643540A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="qlik-table.png" alt="qlik-table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where&lt;/P&gt;&lt;P&gt;1 Loja is the Store&lt;/P&gt;&lt;P&gt;2 Produto is the Product&lt;/P&gt;&lt;P&gt;3 # Vendida is the quantity sold&lt;/P&gt;&lt;P&gt;4 # Vendida TOTAL LOJA is the total quantity grouped by Loja&lt;/P&gt;&lt;P&gt;5 % Vendida Loja / Total is the total quantity sold of each Loja divided by Total Quantity Sold (24.377.848,14) - Means the participation of each Loja (store) from all sales (# Vendida)&lt;/P&gt;&lt;P&gt;6 # Estoque is the stock quantity&lt;/P&gt;&lt;P&gt;7 # Antigo Est. Padrão is the "default" stock quantity of each Loja should have&lt;/P&gt;&lt;P&gt;8 # Antigo Est. Padrão TOTAL PROD is the total of the prior column grouped by Produto&lt;/P&gt;&lt;P&gt;9 % Antigo Est. Padrão PROD / TOTAL is the value of # Antigo Est. Padrão divided by the Total grouped by Produto&lt;/P&gt;&lt;P&gt;10 %Var The difference between columns 5 and 9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The % Var column I calc like this:&lt;/P&gt;&lt;P&gt;if(value10 &amp;gt;= value5, (value10/value5)-1, (value5/value10)-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the table correctly using set analysis.&lt;/P&gt;&lt;P&gt;But I need a chart grouped by Loja counting each time the column 10 %Var is bigger than 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got errors like "nested aggregation not allowed". So I changed every formula to use aggr instead and the table is correctly again. But I can not get the chart to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 4 formula:&lt;/P&gt;&lt;P&gt;aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 5 formula:&lt;/P&gt;&lt;P&gt;aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 8 formula:&lt;/P&gt;&lt;P&gt;aggr(nodistinct sum(all&amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 9 formula:&lt;/P&gt;&lt;P&gt;sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)) / aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 10 formula:&lt;/P&gt;&lt;P&gt;if(&lt;BR /&gt;(aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0))) &amp;gt;=&lt;BR /&gt;(sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0))/aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto))&lt;BR /&gt;,&lt;BR /&gt;(aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0))) /&lt;BR /&gt;(sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0))/aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto))&lt;BR /&gt;,&lt;BR /&gt;(sum(all &amp;lt;Loja,Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0))/aggr(nodistinct sum(all &amp;lt;Produto&amp;gt; if(Semana=0,QTD_EST_PADRAO_ANT,0)), Produto)) /&lt;BR /&gt;(aggr(nodistinct sum(all &amp;lt;Loja&amp;gt; if(Semana=0,QTD_VENDA,0)), Loja) / sum(all if(Semana=0,QTD_VENDA,0)))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I show a chart (pie) with only one dimension (Loja) and a metric showing the total number of times where the column 10 formula is greater than 5 (500%)?&lt;/P&gt;&lt;P&gt;I can send the qvf file if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 14:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-Aggr-Problem/m-p/1607564#M45075</guid>
      <dc:creator>brunolovatti</dc:creator>
      <dc:date>2019-07-30T14:18:40Z</dc:date>
    </item>
  </channel>
</rss>

