<?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 Calculate % Difference in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-Difference/m-p/312794#M497145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it seems to be correct.. have you some selection that interfree?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C u,&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2011 22:45:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-04T22:45:43Z</dc:date>
    <item>
      <title>Calculate % Difference</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Difference/m-p/312793#M497144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone please tell me why i am getting strange results in QV when trying to calculate % difference?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find the difference in sales figuers from 2010 to 2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expression i am using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=((&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;YEAR&lt;/SPAN&gt;={'2011'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;NET_USD&lt;/SPAN&gt;) - &lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;YEAR&lt;/SPAN&gt;={'2010'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;NET_USD&lt;/SPAN&gt;)) / (&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;YEAR&lt;/SPAN&gt;={'2010'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;NET_USD&lt;/SPAN&gt;))*100) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my understanding to calculate % difference you need to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Minus the old from the new&lt;/P&gt;&lt;P&gt;2. Divide what is left by the old value&lt;/P&gt;&lt;P&gt;3. Multiply what is left by 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sales figures i have are 2010 = $94 and 2011 = $180.&amp;nbsp; The % difference figure i should get is 91.49% but in QV I get -122% and i can't understand why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 21:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Difference/m-p/312793#M497144</guid>
      <dc:creator>Sunil_Kenth</dc:creator>
      <dc:date>2011-10-04T21:48:13Z</dc:date>
    </item>
    <item>
      <title>Calculate % Difference</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Difference/m-p/312794#M497145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it seems to be correct.. have you some selection that interfree?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C u,&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 22:45:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Difference/m-p/312794#M497145</guid>
      <dc:creator />
      <dc:date>2011-10-04T22:45:43Z</dc:date>
    </item>
    <item>
      <title>Calculate % Difference</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Difference/m-p/312795#M497146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Stefano - after a detailed look into the expressions i was using, you were correct, i wasn't comparing apples with apples!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above expression IS correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 22:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Difference/m-p/312795#M497146</guid>
      <dc:creator>Sunil_Kenth</dc:creator>
      <dc:date>2011-10-04T22:50:46Z</dc:date>
    </item>
  </channel>
</rss>

