<?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/165165#M503893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Main reason is beacuse this is a simplified version of my actual script which has several different types of measure in. They are all suffixed with either usd, eur or gbp and I want to allow the user to choose which currency equivalent to choose to display and any experssions will then dynamically change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Havign separate variables wouldn't allow this switching between currency equivalents.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Mar 2010 14:17:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-03-02T14:17:41Z</dc:date>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165163#M503891</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:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165163#M503891</guid>
      <dc:creator />
      <dc:date>2010-03-02T14:01:20Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165164#M503892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;quick question why dont you use thre variables:&lt;/P&gt;&lt;P&gt;VOL_EUR, VOL_USD and VOL_GBP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 14:13:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165164#M503892</guid>
      <dc:creator />
      <dc:date>2010-03-02T14:13:42Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165165#M503893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Main reason is beacuse this is a simplified version of my actual script which has several different types of measure in. They are all suffixed with either usd, eur or gbp and I want to allow the user to choose which currency equivalent to choose to display and any experssions will then dynamically change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Havign separate variables wouldn't allow this switching between currency equivalents.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 14:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165165#M503893</guid>
      <dc:creator />
      <dc:date>2010-03-02T14:17:41Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165166#M503894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's an issue with a specific characters in variable in Script&lt;/P&gt;&lt;P&gt;use this line:&lt;/P&gt;&lt;P&gt;LET Vol = '=SUM(amount_'&amp;amp; Chr(36) &amp;amp; '(=ReportCurrency))'&lt;/P&gt;&lt;P&gt;It work's by me&lt;/P&gt;&lt;P&gt;Rds,&lt;BR /&gt;AT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:39:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165166#M503894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-02T15:39:55Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165167#M503895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see that but in the Script you wouldnt be able to switch beetwen the variables?&lt;/P&gt;&lt;P&gt;If you have three variables in the script you could still use them with the currency switch in the application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 15:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165167#M503895</guid>
      <dc:creator />
      <dc:date>2010-03-02T15:50:40Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165168#M503896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Artjoms - top man! This works. Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 16:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165168#M503896</guid>
      <dc:creator />
      <dc:date>2010-03-02T16:11:43Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165169#M503897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a pleasure for me to help &lt;IMG alt="Wink" src="http://community.qlik.com/emoticons/emotion-5.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 16:18:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165169#M503897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-02T16:18:17Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165170#M503898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Discovered that Artjoms' solution only works if there are no dimensions displayed. It seems to aggregated across the whole data set rather than being dimensionally aware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 10:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165170#M503898</guid>
      <dc:creator />
      <dc:date>2010-03-03T10:37:37Z</dc:date>
    </item>
    <item>
      <title>Seript Variables issue</title>
      <link>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165171#M503899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems you are right danmarsh.&lt;/P&gt;&lt;P&gt;I could't find the solution exactly you want, but something I have.&lt;/P&gt;&lt;P&gt;Probably the problem is in Sum function. May be Table and Chart Expression do need this function to be written separately. In this version you need one variable, what will create the name of the field you need:&lt;BR /&gt;e.g. &lt;I&gt;vReportCurrency&lt;/I&gt; with value &lt;I&gt;='amount_'&amp;amp;Only(ReportCurrency)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Then in Expression use:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;=Sum($(vReportCurrency))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;As you can see, in this solution you don't need the problematic variable &lt;I&gt;Vol = '=SUM(amount_'&amp;amp;Chr(36)&amp;amp;'(=ReportCurrency))'&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Not as frexible as you want, but still some flexibility exists&lt;/P&gt;&lt;P&gt;Unfortunately I can't attach an example&lt;/P&gt;&lt;P&gt;Rds,&lt;BR /&gt;AT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 11:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Seript-Variables-issue/m-p/165171#M503899</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-03T11:31:44Z</dc:date>
    </item>
  </channel>
</rss>

