<?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 with sumif function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119050#M895569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny, that seems to have fixed my issue!&lt;/P&gt;&lt;P&gt;Awesome. Much appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2016 10:37:00 GMT</pubDate>
    <dc:creator>snehamahaveer</dc:creator>
    <dc:date>2016-08-03T10:37:00Z</dc:date>
    <item>
      <title>Aggr with sumif function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119048#M895567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was creating a report where I have to first calculate the orders where margins are &amp;lt;45%(for eg) and then sum the sales that come from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using an aggr function with an if and then sum the values, however it seems to not be working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=Sum( if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((sum(SALES)-sum(COST))/sum(SALES)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ORDER_NO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;lt;0.45, sum(SALES)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This formula works when a single order is selected and not when a list of orders are under this category.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt; =if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((sum(SALES)-sum(COST))/sum(SALES)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ORDER_NO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;lt;0.45, ORDER_NO) lists all the orders where margins are less than 45% (for eg)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Can someone help me resolve this issue, as its pretty urgent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119048#M895567</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr with sumif function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119049#M895568</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;&lt;STRONG&gt;=Sum(Aggr(&lt;STRONG style="font-size: 13.3333px;"&gt;If(&lt;/STRONG&gt;(Sum(SALES) - Sum(COST))/Sum(SALES) &amp;lt; 0.45, SALES)&lt;STRONG style="font-size: 13.3333px;"&gt;, ORDER_NO))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 10:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119049#M895568</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-03T10:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr with sumif function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119050#M895569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny, that seems to have fixed my issue!&lt;/P&gt;&lt;P&gt;Awesome. Much appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 10:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119050#M895569</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2016-08-03T10:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr with sumif function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119051#M895570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem at all, I am glad I was able to help you quickly here &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 10:37:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119051#M895570</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-03T10:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr with sumif function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119052#M895571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might also want to try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({&amp;lt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;ORDER_NO = {"=&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(Sum(SALES) - Sum(COST))/Sum(SALES) &amp;lt; 0.45&lt;/STRONG&gt;"}&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;gt;} SALES)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 10:38:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119052#M895571</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-03T10:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr with sumif function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119053#M895572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;True, that seems to work too.! I was under the impression that I cannot use Formulas in set analysis, how wrong I was.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help @Sunny T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 10:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119053#M895572</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2016-08-03T10:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr with sumif function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119054#M895573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can, but only if those formulas are associated with a unique field (in your case it was ORDER_NO). If for some reason you had to check the margin based on ORDER_NO and Month, then set analysis won't work and you will have to go back to Aggr() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 10:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-sumif-function/m-p/1119054#M895573</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-03T10:52:10Z</dc:date>
    </item>
  </channel>
</rss>

