<?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 Seript Variables issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164837#M503463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, this won't work in the load script. The Only function is for expression use primarily. You would still need to define which value of ReportCurrency you want to use for the variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Mar 2010 15:39:07 GMT</pubDate>
    <dc:creator>vgutkovsky</dc:creator>
    <dc:date>2010-03-02T15:39:07Z</dc:date>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164832#M503458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following sameple LOAD script, where I am loading amounts in 3 currencies. I want to allow the user to select the currency being reported by selecting the ReportCurrency value in a list box (with Always One Selected Value set).&lt;/P&gt;&lt;P&gt;Currency:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; DisplayCurrency,ReportCurrency&lt;BR /&gt; EUR, eur&lt;BR /&gt; USD, usd&lt;BR /&gt; GBP, gbp&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Deals:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; amount_gbp, amount_usd, amount_eur&lt;BR /&gt; 100,150,110&lt;BR /&gt; 200,300,220&lt;BR /&gt;];&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;SET Vol = '=SUM(amount_$(ReportCurrency))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The YTDVol script variable seems to evaluate at script run time and does not recognise $(ReportCurrency). If I create a Document Variable as:&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;SUM(amount_&lt;B&gt;&lt;I&gt;$(=ReportCurrency)&lt;/I&gt;&lt;/B&gt;)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;this works OK in chart expressions, but not if I use the Vol variable set in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried various syntaxes without luck yet. Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 14:01:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164832#M503458</guid>
      <dc:creator />
      <dc:date>2010-03-02T14:01:16Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164833#M503459</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;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;SET Cur = 'amount_' &amp;amp; $(ReportCurrency);&lt;BR /&gt;SET Vol = sum(Cur);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:13:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164833#M503459</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-03-02T15:13:56Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164834#M503460</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'm afraid not. The $(ReportCurrency) still seems to be evaluated during script load. If I look in the Variables viewer, The Cur variable shows as 'amount_'&amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164834#M503460</guid>
      <dc:creator />
      <dc:date>2010-03-02T15:27:19Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164835#M503461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops, my mistake, posted my reply without realizing that ReportCurrency is a field, not a variable. So of course variable expansion won't work. You can't load this in the script unless you define which value of ReportCurrency you want to use. Or do you want to cycle through all the values and have a variable hold the sum of each?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:29:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164835#M503461</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-03-02T15:29:46Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164836#M503462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ideally I just want one variable for Volume. I was wondering if I could use Only(ReportCurrency) instead of variable expansion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:36:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164836#M503462</guid>
      <dc:creator />
      <dc:date>2010-03-02T15:36:01Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164837#M503463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, this won't work in the load script. The Only function is for expression use primarily. You would still need to define which value of ReportCurrency you want to use for the variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164837#M503463</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-03-02T15:39:07Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164838#M503464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You can use something similar to&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;SET Vol = 'SUM(amount_' &amp;amp; GetFieldSelections(ReportCurrency) &amp;amp; ')';&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;in the script. &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/164838#M503464</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-03-02T15:44:18Z</dc:date>
    </item>
  </channel>
</rss>

