<?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 removing negative values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/removing-negative-values/m-p/377457#M1167956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a little help with my expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Expenses) / sum(FTE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression displays the expenses per FTE.&amp;nbsp; There are some company's that have forward their expenses to another company, which results in a negative value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I would do a Sum({&amp;lt;Expenses={'&amp;gt;0'}&amp;gt;} Expenses) / sum(FTE), I would get the wrong results, because only the expenses that are above 0 are summed. What I would like to achieve is first do this expression: Sum(Expenses) / sum(FTE), and then use the aggr + if to remove the negative value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this: sum({&amp;lt;Expenses={'&amp;gt;0'}&amp;gt;}(aggr(Sum(Expenses) / sum(FTE), Company))&amp;nbsp; This expression is totally wrong. But it should display the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;Company&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;expeses per fte&lt;BR /&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;-6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lowest value should be 3 instead of -6. How can I remove the negative values in my chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question, Can I sort this table a way that I see the top expeses per fte, right at the top, and the lowest right below it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Aug 2012 15:53:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-13T15:53:11Z</dc:date>
    <item>
      <title>removing negative values</title>
      <link>https://community.qlik.com/t5/QlikView/removing-negative-values/m-p/377457#M1167956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a little help with my expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Expenses) / sum(FTE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression displays the expenses per FTE.&amp;nbsp; There are some company's that have forward their expenses to another company, which results in a negative value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I would do a Sum({&amp;lt;Expenses={'&amp;gt;0'}&amp;gt;} Expenses) / sum(FTE), I would get the wrong results, because only the expenses that are above 0 are summed. What I would like to achieve is first do this expression: Sum(Expenses) / sum(FTE), and then use the aggr + if to remove the negative value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this: sum({&amp;lt;Expenses={'&amp;gt;0'}&amp;gt;}(aggr(Sum(Expenses) / sum(FTE), Company))&amp;nbsp; This expression is totally wrong. But it should display the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;Company&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;expeses per fte&lt;BR /&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;-6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lowest value should be 3 instead of -6. How can I remove the negative values in my chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question, Can I sort this table a way that I see the top expeses per fte, right at the top, and the lowest right below it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 15:53:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/removing-negative-values/m-p/377457#M1167956</guid>
      <dc:creator />
      <dc:date>2012-08-13T15:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: removing negative values</title>
      <link>https://community.qlik.com/t5/QlikView/removing-negative-values/m-p/377458#M1167957</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If i understand your question, something&amp;nbsp; like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =if(Sum(Expenses) / sum(FTE) &amp;gt;0, Sum(Expenses) / sum(FTE))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 16:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/removing-negative-values/m-p/377458#M1167957</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-08-13T16:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: removing negative values</title>
      <link>https://community.qlik.com/t5/QlikView/removing-negative-values/m-p/377459#M1167958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks! that did the job! Sometimes the answer is sooo simple &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;, which makes it hard to guess &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 17:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/removing-negative-values/m-p/377459#M1167958</guid>
      <dc:creator />
      <dc:date>2012-08-13T17:09:47Z</dc:date>
    </item>
  </channel>
</rss>

