<?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 using variable in formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315117#M585016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hans ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try to save the value of vGL_mutatie into another variable and use that variable in the InYear function ,because&amp;nbsp; while using $(vGL_mutatie) refers to the setanalysis and tries to pull the value from set but where it seems like we can't use setanalysis in a InYear function . &lt;/P&gt;&lt;P&gt;I'm not sure it will work but try to take a chance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Meher &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2011 20:10:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-31T20:10:08Z</dc:date>
    <item>
      <title>using variable in formula</title>
      <link>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315114#M585012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have defined a variable &lt;EM&gt;vGL_mutatie&lt;/EM&gt; as &lt;EM&gt;sum({$}Debet)-sum({$}Credit)&lt;/EM&gt;. In a pivot table &lt;EM&gt;=$(vGL_mutatie)&lt;/EM&gt; works. Now I want to apply this variable to the formula &lt;EM&gt;sum(if (InYear (Boekdatum, Today(), -1), Debet))-sum(if (InYear (Boekdatum, Today(), -1), Credit)).&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried several varaties, such as :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if (InYear (Boekdatum, Today(), -1, $(vGL_mutatie))) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum(if (InYear (Boekdatum, Today(), -1, vGL_mutatie)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;who helps me out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 18:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315114#M585012</guid>
      <dc:creator>qlikhans</dc:creator>
      <dc:date>2011-08-31T18:43:25Z</dc:date>
    </item>
    <item>
      <title>using variable in formula</title>
      <link>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315115#M585014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Hans ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you try this &lt;/P&gt;&lt;P&gt;&lt;EM&gt;if (InYear (Boekdatum, Today(), -1, $(=(vGL_mutatie)))) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;hope may be it fixs your issue&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Meher&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 18:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315115#M585014</guid>
      <dc:creator />
      <dc:date>2011-08-31T18:54:33Z</dc:date>
    </item>
    <item>
      <title>using variable in formula</title>
      <link>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315116#M585015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Meher,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, does not fix it. It returns only '-'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;knd rgrds&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 19:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315116#M585015</guid>
      <dc:creator>qlikhans</dc:creator>
      <dc:date>2011-08-31T19:05:16Z</dc:date>
    </item>
    <item>
      <title>using variable in formula</title>
      <link>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315117#M585016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hans ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try to save the value of vGL_mutatie into another variable and use that variable in the InYear function ,because&amp;nbsp; while using $(vGL_mutatie) refers to the setanalysis and tries to pull the value from set but where it seems like we can't use setanalysis in a InYear function . &lt;/P&gt;&lt;P&gt;I'm not sure it will work but try to take a chance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Meher &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 20:10:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315117#M585016</guid>
      <dc:creator />
      <dc:date>2011-08-31T20:10:08Z</dc:date>
    </item>
    <item>
      <title>using variable in formula</title>
      <link>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315118#M585018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Meher,&lt;/P&gt;&lt;P&gt;too complicated for a novice like me.&lt;/P&gt;&lt;P&gt;Do you think there would be an easy method to add up &lt;EM&gt;Debit&lt;/EM&gt; and &lt;EM&gt;Credit&lt;/EM&gt; while loading the script?&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 17:05:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-variable-in-formula/m-p/315118#M585018</guid>
      <dc:creator>qlikhans</dc:creator>
      <dc:date>2011-09-01T17:05:11Z</dc:date>
    </item>
  </channel>
</rss>

