<?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: Syntax Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Syntax-Help/m-p/338805#M1178966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you select a year, the data that count() function will get as input is limited to that year by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably need to use set analysis to disregard the current year selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;Count ({&amp;lt;OpenedYear= &amp;gt;} if (InYearToDate (Matters.OpenedDate, SetDateYear('31/12/2012', GetFieldSelections(OpenedYear)), -1), Matters.OpenedDate))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can probably also replace your if() function with set analysis, please check out the set analysis section in the Help file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Stefan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2012 15:11:17 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-03-06T15:11:17Z</dc:date>
    <item>
      <title>Syntax Help</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-Help/m-p/338804#M1178965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;SPAN style="font-size: 8pt;"&gt; Hi All,I'm relatively new to Qlikview si this might be an obvious problem but myself and my colleague have been banging our heads against the wall trying to figure this out. Basically what I am trying to produce is a comparison table between the year selected and the previous year. It works fine for the selected year, but when I change the expression to look at the previous year nothing is shown. I know the data is there as when I selected the other years the cselected year data always shows. These are the two expressions I have used: &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt;&lt;BR /&gt;Selected Year: &lt;/DIV&gt;&lt;DIV&gt;Count (if (InYearToDate (Matters.OpenedDate, SetDateYear('31/12/2012', GetFieldSelections(OpenedYear)), 0), Matters.OpenedDate)) &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt;Selected Year minus 1:&lt;BR /&gt;Count (if (InYearToDate (Matters.OpenedDate, SetDateYear('31/12/2012', GetFieldSelections(OpenedYear)), -1), Matters.OpenedDate))&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Any pointers would be great.Thanks&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 14:54:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-Help/m-p/338804#M1178965</guid>
      <dc:creator />
      <dc:date>2012-03-06T14:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-Help/m-p/338805#M1178966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you select a year, the data that count() function will get as input is limited to that year by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably need to use set analysis to disregard the current year selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;Count ({&amp;lt;OpenedYear= &amp;gt;} if (InYearToDate (Matters.OpenedDate, SetDateYear('31/12/2012', GetFieldSelections(OpenedYear)), -1), Matters.OpenedDate))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can probably also replace your if() function with set analysis, please check out the set analysis section in the Help file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Stefan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 15:11:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-Help/m-p/338805#M1178966</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-03-06T15:11:17Z</dc:date>
    </item>
    <item>
      <title>Syntax Help</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-Help/m-p/338806#M1178967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you that worked perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 15:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-Help/m-p/338806#M1178967</guid>
      <dc:creator />
      <dc:date>2012-03-06T15:31:34Z</dc:date>
    </item>
  </channel>
</rss>

