<?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: Referring to current field in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577978#M214921</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 cannot use a set expression related to the dimension value. The expression is evaluated outside of the context of the dimensions. Use Above() to compare a value with previous value in chart. This should do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Value) - Above(Sum(Value))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jan 2014 12:27:04 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-01-28T12:27:04Z</dc:date>
    <item>
      <title>Referring to current field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577976#M214919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to build an expression in a bar chart where I want to calculate the difference between today's values and yesterday's. I'm using a date dimension called period. So I thought I could write something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13909096310995876" jivemacro_uid="_13909096310995876" modifiedtitle="true"&gt;
&lt;P&gt;sum(value) - sum({&amp;lt;period = {period -1}&amp;gt;}value)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;...but then I get an "Error in set modifier ad hoc element list" error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Any ideas on what the problem is and how to solve it are very welcome.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Uzi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577976#M214919</guid>
      <dc:creator />
      <dc:date>2014-01-28T12:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to current field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577977#M214920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;sum({&amp;lt;period = {"=$(date(today()))"}&amp;gt;}value) - sum({&amp;lt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;period = {"=$(date(today() - 1))"}&lt;/SPAN&gt;&amp;gt;}value)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;Assuming that period field is in Date format. if not make it the same format as Date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;-Nilesh&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577977#M214920</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2014-01-28T12:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to current field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577978#M214921</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 cannot use a set expression related to the dimension value. The expression is evaluated outside of the context of the dimensions. Use Above() to compare a value with previous value in chart. This should do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Value) - Above(Sum(Value))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577978#M214921</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-01-28T12:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to current field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577979#M214922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uzi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just a metter of syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;period = {"=$(period -1)"}&amp;gt;}value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this case period is selected value.&amp;nbsp; To change it as today&lt;/P&gt;&lt;P&gt; sum({&amp;lt;period = {"=$(today()-1)"}&amp;gt;}value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also set a variable in your script or parameters as vToday = today(),&amp;nbsp;&amp;nbsp; vYesterday = today()-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:29:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referring-to-current-field-in-set-analysis/m-p/577979#M214922</guid>
      <dc:creator />
      <dc:date>2014-01-28T12:29:32Z</dc:date>
    </item>
  </channel>
</rss>

