<?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: Counting with conditional expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029755#M347768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not really sure how you want to aggregate your "above quota" to week or total level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to count each SalesPerson that has exceeded the quota at least once?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then maybe just&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;Count(DISTINCT&lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr( If( Sum(Aggr((Price_TE), Created_New,SalesPersonName,OrderItem_ID)) &amp;gt;53000, &lt;STRONG&gt;SalesPersonName&lt;/STRONG&gt;), Created_New, WeekC,SalesPersonName)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Apr 2016 11:52:29 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-04-01T11:52:29Z</dc:date>
    <item>
      <title>Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029749#M347762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if anyone can help me create an expression im having trouble with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, what i need is an expression that would count the distinct names of salespersons that have in a day a total of sales higher than X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that my expression to get the totals of sales is:&amp;nbsp;&amp;nbsp; Aggr(Price_Total*ExchangeRate,OrderItem_ID). This expression is on a table with dates as dimension. This table gives information of the total sales for each salesperson per day.&lt;/P&gt;&lt;P&gt;What i need is another table that would count how many salesperson have a total sale above X number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 17:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029749#M347762</guid>
      <dc:creator />
      <dc:date>2016-03-31T17:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029750#M347763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT If(Aggr(Price_Total*ExchangeRate, OrderItem_ID) &amp;gt; X, SalesPerson))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 17:40:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029750#M347763</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-31T17:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029751#M347764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&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;=Sum( Aggr( If( Sum(Aggr(Only(Price_Total*ExchangeRate), Dates,SalesPersion,OrderItem_ID)) &amp;gt; 1000, 1,0), Dates, SalesPerson)) &lt;/SPAN&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;// replace 1000 with your X&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;In a chart with dimension Dates.&lt;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;edit: This could probably made much more simple, start with calculating your sales in the script.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 17:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029751#M347764</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-31T17:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029752#M347765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This got my problem 90% solved. The thing that is not working are the total expressions. This is adding the numbers of the previuos days. What i would like it to happen at the totals is that it would display the number of SalesPerson that on that Month it would count how many SalesPerson are above X number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference is that now if someone is above that X on 5 days, it would count him as 5 not as 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 17:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029752#M347765</guid>
      <dc:creator />
      <dc:date>2016-03-31T17:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029753#M347766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this (assuming it is sufficient to pass the threshold once for any given sales person)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If(Dimensionality()=0, // Use SecondaryDimensionality() for a pivoted dimension total&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum( Aggr( If( Sum(Aggr(Only(Price_Total*ExchangeRate), Dates,SalesPersion,OrderItem_ID)) &amp;gt; 1000, 1), SalesPerson)),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum( Aggr( If( Sum(Aggr(Only(Price_Total*ExchangeRate), Dates,SalesPersion,OrderItem_ID)) &amp;gt; 1000, 1), Dates, SalesPerson))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;but, these kind of request are easier to resolve with some sample data to validate against, don't you think so?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 20:58:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029753#M347766</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-31T20:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029754#M347767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it would,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to do something similar to what you suggested but it wont work.&lt;/P&gt;&lt;P&gt;I created a small file with some example data so i could share it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both tables of the file are the ones im creating.&lt;/P&gt;&lt;P&gt;The first one is just the ammount for each salesman for each day. The second table has some information about the sales for each day, and the red line is the one im having trouble in the Total part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 22:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029754#M347767</guid>
      <dc:creator />
      <dc:date>2016-03-31T22:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029755#M347768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not really sure how you want to aggregate your "above quota" to week or total level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to count each SalesPerson that has exceeded the quota at least once?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then maybe just&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;Count(DISTINCT&lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr( If( Sum(Aggr((Price_TE), Created_New,SalesPersonName,OrderItem_ID)) &amp;gt;53000, &lt;STRONG&gt;SalesPersonName&lt;/STRONG&gt;), Created_New, WeekC,SalesPersonName)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 11:52:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029755#M347768</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-01T11:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029756#M347769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really, what i want is that on the total part of the table it would do the comparison to the total amount of that week and count the SalesPerson that are above X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This X would be another value than the daily one, but that issue is already solved, i just want the formula to add the Price_TE for that number of days and compare that total once for each salesman, so i can know wich ones are above X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I making myself clear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the help,&lt;/P&gt;&lt;P&gt;KR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 15:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029756#M347769</guid>
      <dc:creator />
      <dc:date>2016-04-01T15:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029757#M347770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(SecondaryDimensionality() &amp;gt;0, // need to adapt when adding more dimensions &lt;/P&gt;&lt;P&gt;Sum( Aggr( If( Sum(Aggr((Price_TE), Created_New,SalesPersonName,OrderItem_ID)) &amp;gt;53000, 1,0), Created_New, WeekC,SalesPersonName)),&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum( Aggr( If( Sum(Aggr((Price_TE), &lt;EM&gt;WeekC&lt;/EM&gt;,SalesPersonName,OrderItem_ID)) &amp;gt;53000*4, 1,0),&amp;nbsp; &lt;EM&gt;WeekC&lt;/EM&gt;,SalesPersonName))&amp;nbsp; //53000*4 just for testing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 15:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029757#M347770</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-01T15:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Counting with conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029758#M347771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot, this worked great &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 18:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-with-conditional-expression/m-p/1029758#M347771</guid>
      <dc:creator />
      <dc:date>2016-04-01T18:49:19Z</dc:date>
    </item>
  </channel>
</rss>

