<?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: Expression mistake in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059328#M354826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I think your expressions could be simplified, but that would require some more time to look into your data model.&lt;/P&gt;&lt;P&gt;I would assume that you should be able to create similar without the need for so many aggr() functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try something along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( Aggr( If( Sum(Aggr(Price_TE, Created_New,SalesPersonName,OrderItem_ID))&lt;/P&gt;&lt;P&gt;&amp;gt;=&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(TOTAL&amp;lt;WeekC,Created_New&amp;gt; Aggr(Price_TE,OrderItem_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/count(TOTAL&amp;lt;WeekC,Created_New&amp;gt; Distinct SalesPersonName)&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Sum(Aggr(Price_TE, Created_New,SalesPersonName,OrderItem_ID)),0), Created_New, WeekC,SalesPersonName)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2016 22:18:29 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-04-05T22:18:29Z</dc:date>
    <item>
      <title>Expression mistake</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059325#M354823</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,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the following expression working fine. I want a formula that adds the values that exceed X. The thing is, when X is a number, it'll work fine, but i need to get a formula in that number, that would be the average of theTotal Sale witht he number of SalesPerson with a Sale.&lt;/P&gt;&lt;P&gt;I currently have that expression in another column, but it wont work using the Column(1) function. I've also tryed to copy the formula for the average (insted of the X) but it wont work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Aggr(if(Sum(Aggr((Price_TE), Created_New,SalesPersonName,OrderItem_ID))&amp;gt;=X,&lt;/P&gt;&lt;P&gt;Sum(Aggr((Price_TE), Created_New,SalesPersonName,OrderItem_ID)),&lt;/P&gt;&lt;P&gt;0),Created_New, WeekC,SalesPersonName))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone got an idea how i can do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 18:24:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059325#M354823</guid>
      <dc:creator />
      <dc:date>2016-04-05T18:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression mistake</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059326#M354824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share a sample where we can try it out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 18:32:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059326#M354824</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-05T18:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Expression mistake</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059327#M354825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the last expression of the last table (the red one) to use insted of the value 100000 i wrote there, to be the value from Column(7), or the average of each SalesPerson.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 20:27:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059327#M354825</guid>
      <dc:creator />
      <dc:date>2016-04-05T20:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Expression mistake</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059328#M354826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I think your expressions could be simplified, but that would require some more time to look into your data model.&lt;/P&gt;&lt;P&gt;I would assume that you should be able to create similar without the need for so many aggr() functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try something along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( Aggr( If( Sum(Aggr(Price_TE, Created_New,SalesPersonName,OrderItem_ID))&lt;/P&gt;&lt;P&gt;&amp;gt;=&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(TOTAL&amp;lt;WeekC,Created_New&amp;gt; Aggr(Price_TE,OrderItem_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/count(TOTAL&amp;lt;WeekC,Created_New&amp;gt; Distinct SalesPersonName)&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Sum(Aggr(Price_TE, Created_New,SalesPersonName,OrderItem_ID)),0), Created_New, WeekC,SalesPersonName)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 22:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059328#M354826</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-05T22:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expression mistake</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059329#M354827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;awsome, this worked gr8, had to make few adjustment for the totals but it worked!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 22:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-mistake/m-p/1059329#M354827</guid>
      <dc:creator />
      <dc:date>2016-04-05T22:55:55Z</dc:date>
    </item>
  </channel>
</rss>

