<?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 comparing two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/comparing-two-dates/m-p/231534#M500806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon,&lt;BR /&gt;&lt;BR /&gt; Is to improve the attached file?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; Thanks,&lt;BR /&gt;&lt;BR /&gt; Gledson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Feb 2011 19:17:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-26T19:17:05Z</dc:date>
    <item>
      <title>comparing two dates</title>
      <link>https://community.qlik.com/t5/QlikView/comparing-two-dates/m-p/231534#M500806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon,&lt;BR /&gt;&lt;BR /&gt; Is to improve the attached file?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; Thanks,&lt;BR /&gt;&lt;BR /&gt; Gledson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Feb 2011 19:17:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/comparing-two-dates/m-p/231534#M500806</guid>
      <dc:creator />
      <dc:date>2011-02-26T19:17:05Z</dc:date>
    </item>
    <item>
      <title>comparing two dates</title>
      <link>https://community.qlik.com/t5/QlikView/comparing-two-dates/m-p/231535#M500807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Set Analysis would be good to try. Instead of:&lt;/P&gt;&lt;P&gt;if(AnoInicio5ano = 2009, Sum([Qtd Aluno]))&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;AnoInicio5ano = {2009}&amp;gt;} [Qtd Aluno])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wanted you could also try something like:&lt;/P&gt;&lt;P&gt;sum( {$1} [Qtd Aluno])&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;sum([Qtd Aluno])&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Using the second would give you some flexibility.&lt;/P&gt;&lt;P&gt;"sum([Qtd Aluno])" gives you the sum of your current selection.&lt;/P&gt;&lt;P&gt;"sum( {$1} [Qtd Aluno])" gives you the sum of your previous selection.&lt;/P&gt;&lt;P&gt;So, if you had more than two years, say 2007, 2008, 2009 and 2010 you could select which years you wanted to compare without having a anymore than two columns in your chart.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 04:55:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/comparing-two-dates/m-p/231535#M500807</guid>
      <dc:creator />
      <dc:date>2011-02-27T04:55:28Z</dc:date>
    </item>
    <item>
      <title>comparing two dates</title>
      <link>https://community.qlik.com/t5/QlikView/comparing-two-dates/m-p/231536#M500808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gledson,&lt;/P&gt;&lt;P&gt;Set analysis is generally better, but if syntax can be simpler to read. It would appear you have the order of the if and the sum wrong in the expression:&lt;/P&gt;&lt;P&gt;if(AnoInicio5ano = 2009, Sum([Qtd Aluno]))&lt;/P&gt;&lt;P&gt;Should read:&lt;/P&gt;&lt;P&gt;Sum(if(AnoInicio5ano = 2009, [Qtd Aluno], 0))&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 19:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/comparing-two-dates/m-p/231536#M500808</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-02-27T19:08:55Z</dc:date>
    </item>
  </channel>
</rss>

