<?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 Can you explain to me this expression: in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-you-explain-to-me-this-expression/m-p/314647#M116100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this expression in a straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Year=&lt;SPAN style="text-decoration: underline;"&gt;{$(=Only(Year)-1)}&amp;gt;&lt;/SPAN&gt;}&amp;nbsp; Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot get this syntax (the underline one)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Dec 2011 14:18:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-20T14:18:49Z</dc:date>
    <item>
      <title>Can you explain to me this expression:</title>
      <link>https://community.qlik.com/t5/QlikView/Can-you-explain-to-me-this-expression/m-p/314647#M116100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this expression in a straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Year=&lt;SPAN style="text-decoration: underline;"&gt;{$(=Only(Year)-1)}&amp;gt;&lt;/SPAN&gt;}&amp;nbsp; Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot get this syntax (the underline one)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 14:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-you-explain-to-me-this-expression/m-p/314647#M116100</guid>
      <dc:creator />
      <dc:date>2011-12-20T14:18:49Z</dc:date>
    </item>
    <item>
      <title>Can you explain to me this expression:</title>
      <link>https://community.qlik.com/t5/QlikView/Can-you-explain-to-me-this-expression/m-p/314648#M116101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if variable Yaer = 2011&amp;nbsp;&amp;nbsp; is the sum of sales for year 2010&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 14:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-you-explain-to-me-this-expression/m-p/314648#M116101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-20T14:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can you explain to me this expression:</title>
      <link>https://community.qlik.com/t5/QlikView/Can-you-explain-to-me-this-expression/m-p/314649#M116102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$(=Only(Year)-1) is a dollar sign expansion, so it will evaluate the expression contained and it will be replaced with the result before the sum(... Sales) is evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only(Year) will return the possible value from field Year, but only if there is only one possible value (i.e. you have actively selected one year or limited to one possible by selecting on other fields). You could also use max(Year) to always get a value returned, though results are different to only(year) if there are multiple possible values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you deduct 1 from the Year value, giving the year number prior the possible value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if today's year 2011 is the only possible value, it will expand to&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Year={2010}&amp;gt;}&amp;nbsp; Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 14:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-you-explain-to-me-this-expression/m-p/314649#M116102</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-20T14:28:22Z</dc:date>
    </item>
  </channel>
</rss>

