<?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: Conditional aggr expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322578#M1184994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those aren't the numbers I get loading in your file.&amp;nbsp; If I select just those days, use Day as a dimension, and calculate sum(Sales), I get 650623.&amp;nbsp; That's the same number my expression gives if you select Salesman ID 2005.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression, Salesman= means to ignore the salesman.&amp;nbsp; However, Day=P() says to only include days that salesman worked.&amp;nbsp; That's my understanding of what you want.&amp;nbsp; The total revenue for all salesmen for the dates that salesman 2005 worked.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when you say "and the list will go on for other salesmen", do you mean that you want a chart that can have salesman as the dimension and display multiple salesmen at once?&amp;nbsp; That's significantly more complicated than displaying data for one selected salesman.&amp;nbsp; I think it's doable from past experience, but it could be ugly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2011 00:49:20 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-11-16T00:49:20Z</dc:date>
    <item>
      <title>Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322574#M1184990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do a conditional aggr function but failing.&lt;/P&gt;&lt;P&gt;I am trying to filter on salesman_id to find out what days he has worked.&lt;/P&gt;&lt;P&gt;I then wan to calculate the total sales by all salesman for that day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. in the attached spreadsheet, salesman Id 2005 has worked days 1,4,7,9 etc&lt;/P&gt;&lt;P&gt;I remove the filter from salesman ID and put the filter on day 1.&lt;/P&gt;&lt;P&gt;I then get the total of List Price for day one which is 90483.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am struggling to put this in my expression, please help&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 22:11:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322574#M1184990</guid>
      <dc:creator />
      <dc:date>2011-11-15T22:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322575#M1184991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood the problem, I think this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Day=P(),"Salesman ID"=&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 22:59:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322575#M1184991</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-15T22:59:44Z</dc:date>
    </item>
    <item>
      <title>Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322576#M1184992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks for the response.&lt;/P&gt;&lt;P&gt;Always to the rescue.&lt;/P&gt;&lt;P&gt;The expression seems correct, howeve I will not be able to test it untill tomorrow.&lt;/P&gt;&lt;P&gt;I will get some feedback tomorrow.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 23:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322576#M1184992</guid>
      <dc:creator />
      <dc:date>2011-11-15T23:54:05Z</dc:date>
    </item>
    <item>
      <title>Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322577#M1184993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I can forsee a problem when displaying the data using salaman ID as a dimension.&lt;/P&gt;&lt;P&gt;It will only sum the values for Salesman ID 2005. But I want it to add the totals for the days where Salesman ID 2005 has worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if Slaesman ID 2005 has worked as shown in days below and total is the total revenue for that day for sales made by all sales people.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px;"&gt;&lt;COL span="2" style="width: 48pt;" width="64" /&gt; &lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD height="17" style="height: 12.75pt; width: 48pt;" width="64"&gt;Day&lt;/TD&gt;&amp;nbsp; &lt;TD style="width: 48pt;" width="64"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;1&lt;/TD&gt;&amp;nbsp; &lt;TD align="right"&gt;90483&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;4&lt;/TD&gt;&amp;nbsp; &lt;TD align="right"&gt;158462&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;7&lt;/TD&gt;&amp;nbsp; &lt;TD align="right"&gt;38889&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;9&lt;/TD&gt;&amp;nbsp; &lt;TD align="right"&gt;142568&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;11&lt;/TD&gt;&amp;nbsp; &lt;TD align="right"&gt;97869&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;20&lt;/TD&gt;&amp;nbsp; &lt;TD align="right"&gt;84376&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&amp;nbsp; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;21&lt;/TD&gt;&amp;nbsp; &lt;TD align="right"&gt;166461&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;totals above add upto 779108&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want it to show as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="51" style="width: 198px;"&gt;&lt;COL style="width: 61pt;" width="81" /&gt; &lt;COL style="width: 48pt;" width="64" /&gt; &lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt; &lt;TD height="17" style="height: 12.75pt; width: 61pt;" width="81"&gt;Slaesman ID&lt;/TD&gt; &lt;TD style="width: 48pt;" width="64"&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt; &lt;TD align="right" height="17" style="height: 12.75pt;"&gt;2005&lt;/TD&gt; &lt;TD align="right"&gt;779108&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="64"&gt;&lt;COL width="64" /&gt;&lt;TBODY&gt;&lt;TR&gt; &lt;TD align="right" height="17" style="height: 12.75pt; width: 48pt;" width="64"&gt;779108&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;and list will go on for other salesman...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope thats clear.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322577#M1184993</guid>
      <dc:creator />
      <dc:date>2011-11-16T00:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322578#M1184994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those aren't the numbers I get loading in your file.&amp;nbsp; If I select just those days, use Day as a dimension, and calculate sum(Sales), I get 650623.&amp;nbsp; That's the same number my expression gives if you select Salesman ID 2005.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression, Salesman= means to ignore the salesman.&amp;nbsp; However, Day=P() says to only include days that salesman worked.&amp;nbsp; That's my understanding of what you want.&amp;nbsp; The total revenue for all salesmen for the dates that salesman 2005 worked.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when you say "and the list will go on for other salesmen", do you mean that you want a chart that can have salesman as the dimension and display multiple salesmen at once?&amp;nbsp; That's significantly more complicated than displaying data for one selected salesman.&amp;nbsp; I think it's doable from past experience, but it could be ugly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 00:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322578#M1184994</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T00:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322579#M1184995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately I cant open the qv file as i'm using thr QV demo version.&lt;/P&gt;&lt;P&gt;I am attachimg my qv file.&lt;/P&gt;&lt;P&gt;In the file, you can see that Salesman ID 2005 is selected. And on the right, the days he has worked are displayed.&lt;/P&gt;&lt;P&gt;All I want to do is show each salesman with the total of days they have worked.&lt;/P&gt;&lt;P&gt;You might be getting wrong results because you might have the sum on Sales where I have it on List Price&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 01:06:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322579#M1184995</guid>
      <dc:creator />
      <dc:date>2011-11-16T01:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322580#M1184996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So yes, if you change "Sales" to "List Price" in the expression I gave you, it returns 779108 for Salesman 2005.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 16:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322580#M1184996</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-16T16:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322581#M1184997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry if I'm confusing you John, but I don't want Day as dimension.&lt;/P&gt;&lt;P&gt;I want Salesman ID as dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 16:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322581#M1184997</guid>
      <dc:creator />
      <dc:date>2011-11-16T16:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322582#M1184998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try building your table with dimension Salesman ID and expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( aggr(if(sum([List Price]), sum(total&amp;lt;Day&amp;gt; [List Price])), [Salesman ID],Day))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: attached app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 17:07:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322582#M1184998</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-16T17:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322583#M1184999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly what I'm talking about.&lt;/P&gt;&lt;P&gt;Thanks alot John and Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 17:32:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322583#M1184999</guid>
      <dc:creator />
      <dc:date>2011-11-16T17:32:20Z</dc:date>
    </item>
    <item>
      <title>Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322584#M1185000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that my expression will only take days into account, where sum([List Price]) per Salesman ID is larger than zero. If your Salesman do work without resulting in revenue / [List Price] value, this will not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 18:25:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322584#M1185000</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-16T18:25:29Z</dc:date>
    </item>
    <item>
      <title>Conditional aggr expression</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322585#M1185001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip Stefan.&lt;/P&gt;&lt;P&gt;I should be OK as I don't have null or - values.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 15:14:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-aggr-expression/m-p/322585#M1185001</guid>
      <dc:creator />
      <dc:date>2011-11-17T15:14:29Z</dc:date>
    </item>
  </channel>
</rss>

