<?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: Inserting variable in script to be evaluated later in dimmension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271745#M497768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure! I'll try it right now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2011 16:55:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-25T16:55:25Z</dc:date>
    <item>
      <title>Inserting variable in script to be evaluated later in dimmension</title>
      <link>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271741#M497764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a problem trying to insert a variable into a static table, then try to evaluate its value in runtime, but I keep getting errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1- Load a tatic table with the dynamic value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StaticTable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NOCONCATENATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LOAD * INLINE [ &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DimDef, "IF($(var1)=0, 1, 0)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2 - Use the field's value as a Calculated Dimension Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(=DimDef)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I Load the data, the expression of the column is evaluated prior setting the dimension definition, and the static table's row has the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StaticTable:&lt;/P&gt;&lt;P&gt;DimDef&lt;/P&gt;&lt;P&gt;"IF(1=0)=0, 1, 0"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the value neves changes, since the variable was evaluated at load time, not in at "chart time"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to play around with this approach and replacing the quotes but didnt worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/59213#59213"&gt;http://community.qlik.com/message/59213#59213&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Suggestion so I can enter "IF($(var1)=0, 1, 0)" in my static table and it goes untouched to my chart's calculated dimmension, so at the end, the expression will be calculated in runtime?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for the time &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-ed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 22:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271741#M497764</guid>
      <dc:creator />
      <dc:date>2011-10-24T22:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting variable in script to be evaluated later in dimmension</title>
      <link>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271742#M497765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I can tell there's no way to turn off dollar sign expansion in the load scripts. For variables, you can use the replacement trick you referenced but for inline tables the only workaround I've found is to convert the inline table to a csv or excel file and load it from the file instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 00:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271742#M497765</guid>
      <dc:creator />
      <dc:date>2011-10-25T00:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting variable in script to be evaluated later in dimmension</title>
      <link>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271743#M497766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/vhuynh" id="jive-37527988190746157477" style="font-size: 12px; color: #007fc0; font-weight: bold;"&gt;vhuynh&lt;/A&gt;, thanks for your recomendation, it look like you were trying to achieve the same some time ago, was the external file the only solution that you got this working?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mentioned it to our lead and he didn't like to much the idea of having external files, this is why I am trying to get it to work somehow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 15:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271743#M497766</guid>
      <dc:creator />
      <dc:date>2011-10-25T15:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting variable in script to be evaluated later in dimmension</title>
      <link>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271744#M497767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; '$' &amp;amp; DimDef as DimDef&lt;/P&gt;&lt;P&gt;inline [&lt;/P&gt;&lt;P&gt;&amp;nbsp; DimDef&lt;/P&gt;&lt;P&gt;&amp;nbsp; (var1)&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that's much less readable than an external file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 16:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271744#M497767</guid>
      <dc:creator />
      <dc:date>2011-10-25T16:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting variable in script to be evaluated later in dimmension</title>
      <link>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271745#M497768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure! I'll try it right now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 16:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271745#M497768</guid>
      <dc:creator />
      <dc:date>2011-10-25T16:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting variable in script to be evaluated later in dimmension</title>
      <link>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271746#M497769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, it worked like a charm, great solution, now I can use dynamic functions as Calculated Dimmensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-ed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 15:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inserting-variable-in-script-to-be-evaluated-later-in-dimmension/m-p/271746#M497769</guid>
      <dc:creator />
      <dc:date>2011-10-28T15:14:03Z</dc:date>
    </item>
  </channel>
</rss>

