<?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: Arithmetic with a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Arithmetic-with-a-variable/m-p/370396#M1172098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(=$(vMaxYear)-1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2012 19:47:29 GMT</pubDate>
    <dc:creator>CELAMBARASAN</dc:creator>
    <dc:date>2012-07-26T19:47:29Z</dc:date>
    <item>
      <title>Arithmetic with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Arithmetic-with-a-variable/m-p/370395#M1172096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure this is rock-stupid, but I can't find the correct syntax anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable, vMaxYear. My expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(vMaxYear)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;dlogin&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;COC_Company&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works perfectly well to give me a count of "dlogin" by Company when the year = max year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I want to find out what happened in the &lt;EM&gt;previous year&lt;/EM&gt;. I have tried "$(vMaxYear)-1", "$(vMaxYear-1)", "=$(vMaxYear)-1", and other&lt;/P&gt;&lt;P&gt;variations on the theme. None work. I have searched through the documentation, and can't find anything on the correct syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 19:40:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Arithmetic-with-a-variable/m-p/370395#M1172096</guid>
      <dc:creator />
      <dc:date>2012-07-26T19:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Arithmetic-with-a-variable/m-p/370396#M1172098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(=$(vMaxYear)-1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 19:47:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Arithmetic-with-a-variable/m-p/370396#M1172098</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-07-26T19:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Arithmetic-with-a-variable/m-p/370397#M1172100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect. Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 19:51:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Arithmetic-with-a-variable/m-p/370397#M1172100</guid>
      <dc:creator />
      <dc:date>2012-07-26T19:51:03Z</dc:date>
    </item>
  </channel>
</rss>

