<?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 Need help with showing differences in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360185#M1175210</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;You can do this with the following expressions (modify as required):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Sum({&amp;lt;Year = {2011}&amp;gt;} Sales)&lt;/LI&gt;&lt;LI&gt;Sum({&amp;lt;Year = {2012}&amp;gt;} Sales)&lt;/LI&gt;&lt;LI&gt;Sum({&amp;lt;Year = {2012}&amp;gt;} Sales) - Sum({&amp;lt;Year = {2011}&amp;gt;} Sales)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;You need a Year field for this to work. If you don't have one, add one in your load script with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(SalesDate) As Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM ..;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might want to post your qvw (or a sample thereof) for more specific assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2012 18:32:57 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2012-04-19T18:32:57Z</dc:date>
    <item>
      <title>Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360184#M1175209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to show the difference between 2012 and 2011 data.&amp;nbsp; I have the data in the pivottable chart in Qlikview, but I cannot figure out how to show the difference between year.&amp;nbsp; For example, i sold 10000 of product A in 2011, and 12500 of product A in 2012.&amp;nbsp; I want another column that shows me the difference of 2500. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 18:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360184#M1175209</guid>
      <dc:creator />
      <dc:date>2012-04-19T18:05:32Z</dc:date>
    </item>
    <item>
      <title>Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360185#M1175210</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;You can do this with the following expressions (modify as required):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Sum({&amp;lt;Year = {2011}&amp;gt;} Sales)&lt;/LI&gt;&lt;LI&gt;Sum({&amp;lt;Year = {2012}&amp;gt;} Sales)&lt;/LI&gt;&lt;LI&gt;Sum({&amp;lt;Year = {2012}&amp;gt;} Sales) - Sum({&amp;lt;Year = {2011}&amp;gt;} Sales)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;You need a Year field for this to work. If you don't have one, add one in your load script with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(SalesDate) As Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM ..;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might want to post your qvw (or a sample thereof) for more specific assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 18:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360185#M1175210</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-04-19T18:32:57Z</dc:date>
    </item>
    <item>
      <title>Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360186#M1175211</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; I should agree with Jonathan. His solution will work perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But you can also try this expression which is exactly what you have asked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count({&amp;lt;Product={'A'}, Year={2012}&amp;gt;} DISTINCT Product) - Count({&amp;lt;Product={'A'}, Year={2011}&amp;gt;} DISTINCT Product)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The above expression gives you the difference of no of Product A sold in 2012 and 2011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Andrew Hudson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 00:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360186#M1175211</guid>
      <dc:creator>adhudson</dc:creator>
      <dc:date>2012-04-20T00:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360187#M1175212</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;No need of writing any new expressions for this, just use the expressions you already used for 2011 and 2012.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose if your expression name Year 2011 and Year 2011 the the difference of this expression would be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=[Year 2012] - [Year 2011]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 06:08:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360187#M1175212</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-04-20T06:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360188#M1175213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks to all for this help, I really appreciate it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 12:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360188#M1175213</guid>
      <dc:creator />
      <dc:date>2012-04-20T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360189#M1175214</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Close this discussion by clicking Correct and Help answers for the posts which really helped &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you, so others will find the solution easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Iyyappan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 15:00:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360189#M1175214</guid>
      <dc:creator>v_iyyappan</dc:creator>
      <dc:date>2012-04-20T15:00:25Z</dc:date>
    </item>
    <item>
      <title>Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360190#M1175215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; One more question, I want to see the difference between year and a specific company.&amp;nbsp; So i need to say where year = 2011, which is work, but also where COMPANY = KateAspen.&amp;nbsp; I need that in the same query, how would i do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2012 14:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360190#M1175215</guid>
      <dc:creator />
      <dc:date>2012-05-11T14:31:45Z</dc:date>
    </item>
    <item>
      <title>Need help with showing differences</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360191#M1175216</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;Just add it to the set expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year = {2011}, &lt;STRONG&gt;Company = {'KateAspen'}&lt;/STRONG&gt;&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2012 13:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-showing-differences/m-p/360191#M1175216</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-05-12T13:32:56Z</dc:date>
    </item>
  </channel>
</rss>

