<?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: Filtering the sum/count function in SET ANALYSIS Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97874#M766174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your expression above you filter agent with your criteria,&lt;/P&gt;&lt;P&gt;but once agent is filtered, sales are not&lt;/P&gt;&lt;P&gt;I think you ought to add a filter too for sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Jun 2018 05:18:23 GMT</pubDate>
    <dc:creator>ogautier62</dc:creator>
    <dc:date>2018-06-30T05:18:23Z</dc:date>
    <item>
      <title>Filtering the sum/count function in SET ANALYSIS Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97873#M766173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I'm trying to achieve similar to a SQL having function in Qlikview in set analysis and I need help please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I''m using this below expression in a pivot table along with other expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With below expression, I'm trying to find the count of sales rep who have produced more than 10k for different combination of filters. The below expression seems to be working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=COUNT({&amp;lt;[Agent_Id] = {"=sum({&amp;lt;New_Sales_Flag = {'Y'}, [Year]={'$(vYear)'}, [Date] = {'&amp;lt;=$(vLastBusinessday) '} &amp;gt;} Sales) &amp;gt;=10000"}&amp;gt;}&amp;nbsp;&amp;nbsp; DISTINCT [Agent_Id] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having issues with the below sum expression where I'm trying to do the above but calculate the total sales amount for all those agents who did sales more than 10k&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;[Agent_Id] = {"=sum({&amp;lt;New_Sales_Flag = {'Y'}, [Year]={'$(vYear)'}, [Date] = {'&amp;lt;=$(vLastBusinessday) '} &amp;gt;} Sales) &amp;gt;=10000"}&amp;gt;}&amp;nbsp;&amp;nbsp; [Sales] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its funny I referred to the reply from Miguel Angel from the below post and achieved the count. But Sum is not working as expected. My sum result number doubles or triples and its not accurate.&amp;nbsp; Any help would be much appreciated. &lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;SPAN class="icon-status-icon icon-mvp" title="Mvp"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/155805" target="_blank"&gt;Functional filtering in Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&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/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97873#M766173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering the sum/count function in SET ANALYSIS Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97874#M766174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your expression above you filter agent with your criteria,&lt;/P&gt;&lt;P&gt;but once agent is filtered, sales are not&lt;/P&gt;&lt;P&gt;I think you ought to add a filter too for sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2018 05:18:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97874#M766174</guid>
      <dc:creator>ogautier62</dc:creator>
      <dc:date>2018-06-30T05:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering the sum/count function in SET ANALYSIS Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97875#M766175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you check this first and show the value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=sum({&amp;lt;New_Sales_Flag = {'Y'}, [Year]={'$(vYear)'}, [Date] = {'&amp;lt;=$(vLastBusinessday) '} &amp;gt;} Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2018 05:39:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97875#M766175</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-06-30T05:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering the sum/count function in SET ANALYSIS Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97876#M766176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This gives me the total sales for the dimension. But I need the total sales for the agents who have done above 10k.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2018 23:22:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97876#M766176</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-02T23:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering the sum/count function in SET ANALYSIS Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97877#M766177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help. I tried with the below and it works. I had to use the aggr function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(if(&lt;/P&gt;&lt;P&gt;sum(aggr(sum( {&amp;lt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;New_Sales_Flag&lt;/STRONG&gt;&lt;/SPAN&gt;= {'Y'}, [&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/SPAN&gt;]={'$(vYear)'}, [Date] = {'&amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;vLastBusinessday&lt;/STRONG&gt;&lt;/SPAN&gt;) '}&amp;gt;}&amp;nbsp; [Sales] ), [sales_Rep])) &amp;gt;= 10000,&lt;/P&gt;&lt;P&gt;sum( {&amp;lt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;New_Sales_Flag&lt;/STRONG&gt;&lt;/SPAN&gt; = {'Y'}, [Year]={'$(vYear)'}, [Date] = {'&amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;vLastBusinessday&lt;/STRONG&gt;&lt;/SPAN&gt;) '}&amp;gt;}&amp;nbsp; [Sales] ),&lt;/P&gt;&lt;P&gt;0), &lt;/P&gt;&lt;P&gt;sales_Rep]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2018 01:43:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97877#M766177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-03T01:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering the sum/count function in SET ANALYSIS Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97878#M766178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;=sum({&amp;lt;New_Sales_Flag = {'Y'}, [Year]={'$(vYear)'}, [Date] = {'&amp;lt;=$(vLastBusinessday) '}&lt;SPAN style="color: #ff0000;"&gt;, Sales = {"=Sum(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;{&amp;lt;New_Sales_Flag = {'Y'}, [Year]={'$(vYear)'}, [Date] = {'&amp;lt;=$(vLastBusinessday) '}&amp;gt;} &lt;/STRONG&gt;Sales)&amp;gt;10000"}&lt;/SPAN&gt; &amp;gt;} Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2018 05:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-the-sum-count-function-in-SET-ANALYSIS-Expression/m-p/97878#M766178</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-07-03T05:00:59Z</dc:date>
    </item>
  </channel>
</rss>

