<?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 Help to Declare and Assign complicated variable just into the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210125#M64854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Instead of Dollar sign in script use this ' &amp;amp; Chr(36) &amp;amp; '&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Apr 2010 08:22:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-12T08:22:10Z</dc:date>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210119#M64848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/Test_2D00_Creating-Group-Sample-20100411000.qvw]&lt;/P&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I am declaring the variable "vSalesByCurrency" into Document properties as:&lt;/P&gt;&lt;P&gt;If($(vCountYear)&amp;gt;3, Sum($(=Concat(SalesByCurrency))) * $(vYearFlag), Sum($(=Concat(SalesByCurrency))))&lt;/P&gt;&lt;P&gt;and then using it as an expression in Table1 as:&lt;/P&gt;&lt;P&gt;=$(vSalesByCurrency)&lt;/P&gt;&lt;P&gt;The question is: Is there any chance to declare and assign this variable just in the script?&lt;/P&gt;&lt;P&gt;I want to avoid declaring it in Document properties.&lt;/P&gt;&lt;P&gt;I've been trying several ways, but getting internal error...&lt;/P&gt;&lt;P&gt;see the attachment.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Apr 2010 07:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210119#M64848</guid>
      <dc:creator />
      <dc:date>2010-04-11T07:33:09Z</dc:date>
    </item>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210120#M64849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Certainly, you can declare and assign values to a variable from within the script.&lt;/P&gt;&lt;P&gt;The syntax is:&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;Let vMyStartDate = MakeDate(2009,12,10);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Alternately, you can use Set instead of Let. You can see the help file for the differences.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 06:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210120#M64849</guid>
      <dc:creator>vupen</dc:creator>
      <dc:date>2010-04-12T06:15:01Z</dc:date>
    </item>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210121#M64850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi man,&lt;/P&gt;&lt;P&gt;Thanks for answering.&lt;/P&gt;&lt;P&gt;I know how to declare a simple and assign a simple one, but getting hard with the example I post above...&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 06:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210121#M64850</guid>
      <dc:creator />
      <dc:date>2010-04-12T06:28:42Z</dc:date>
    </item>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210122#M64851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem with the variable assignment in your example are 2:&lt;/P&gt;&lt;P&gt;a. You are using a set modifier - by using Sum($=&amp;lt;exp&amp;gt;). Set modifiers are not allowed inside the script&lt;/P&gt;&lt;P&gt;b. You are trying to sum a string; and then multiply a string with a number - Concat(SalesByCurrency) returns a string, and this is being summed up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 06:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210122#M64851</guid>
      <dc:creator>vupen</dc:creator>
      <dc:date>2010-04-12T06:36:34Z</dc:date>
    </item>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210123#M64852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Upendra,&lt;/P&gt;&lt;P&gt;Could you help to understand what's the meaning of:&lt;/P&gt;&lt;P&gt;$( =Concat(SalesByCurrency) )&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 07:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210123#M64852</guid>
      <dc:creator />
      <dc:date>2010-04-12T07:48:43Z</dc:date>
    </item>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210124#M64853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Concat is an aggregate function, and should be used with Group By.&lt;/P&gt;&lt;P&gt;Concat creates a string (a seperator can be specified) that is made up of values in successive rows.&lt;/P&gt;&lt;P&gt;And $(=&amp;lt;exp&amp;gt;) is a set modifier, where you are trying to calculate the sum, but with a different criterion (the formula you gave is incomplete).&lt;/P&gt;&lt;P&gt;Ex. Sum ({$&amp;lt;Currency=$(=$(vCurrency))&amp;gt; Sales} will give Sales for the current selection, but only for the defined Currency.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 08:15:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210124#M64853</guid>
      <dc:creator>vupen</dc:creator>
      <dc:date>2010-04-12T08:15:32Z</dc:date>
    </item>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210125#M64854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Instead of Dollar sign in script use this ' &amp;amp; Chr(36) &amp;amp; '&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 08:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210125#M64854</guid>
      <dc:creator />
      <dc:date>2010-04-12T08:22:10Z</dc:date>
    </item>
    <item>
      <title>Help to Declare and Assign complicated variable just into the script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210126#M64855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys,&lt;/P&gt;&lt;P&gt;I will try using your suggestions.&lt;/P&gt;&lt;P&gt;Once I have the answer to the post, I will set it to solve.&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 10:57:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-Declare-and-Assign-complicated-variable-just-into-the/m-p/210126#M64855</guid>
      <dc:creator />
      <dc:date>2010-04-12T10:57:47Z</dc:date>
    </item>
  </channel>
</rss>

