<?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: Difference between LET and SET? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626573#M1098025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;A variable is an entity used to contain a single data value which can be a number, a character or a string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;The variable acquires its value from LET or SET in the Script or from an Input Box in a layout which can be set by users.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;There are few ways to create variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;1. Variables Tab in the Document Properties&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;2. New Variables in New Input Box Properties&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;3. Variable Overview in Settings Menu&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;4. Using ‘SET’ or ‘LET’ in Edit Script&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; text-align: justify; font-size: 10pt; font-style: inherit; margin-bottom: 0.0001pt; font-family: Verdana, sans-serif; font-weight: inherit;"&gt;If the first character of the string starts with an equal sign ‘ = ‘, QlikView evaluates it as a formula and stores the evaluated result in it. Otherwise, it holds the value as a string.&amp;nbsp; You can store a formula with equal sign in front, then you can just use the variable in the expression without Dollar Sign Expansion, if it is storing a string as a formula, then you need to use the Dollar Sign Expansion: ‘$(variablename)’.&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; list-style-type: lower-roman; color: #3d3d3d;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;i.e. Let’s create two variables: vString1 and vString2.&amp;nbsp; vString1 stores a string ’1+3′ and vString2 stores a string ‘=1+3′.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Create a new Text Object and type ‘=vString1′, you will see ’1+3′ in the text object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Then create another Text Object and type in ‘=$(vString1), then Dollar Sign Expansion evaluates the formula and you will get ’4′.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Then create another Text box and type in ‘=vString2′, you will see ’4′ in it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;‘LET’ and ‘SET’ are used for defining Variables in the script.&amp;nbsp; The variables can be used for substituting strings, paths, drives, etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;‘SET’ treats everything after the equal sign (=) as String.&amp;nbsp; If it contains space, then you need double quote in the beginning and the end.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;The syntax is: set variablename=string&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Examples:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Set FileToUse=Data1.csv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Set Constant=”My string”;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Set BudgetYear=1997;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;‘LET’ evaluates the expression after the equal sign (=) and stores the value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;The syntax is: let variablename=expression&amp;nbsp; (Note: the word ’let’ can be omitted. )&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Examples&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let x=Today(); &amp;gt;&amp;gt; x=12/01/2012&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let y=’Today()’; &amp;gt;&amp;gt; y=Today()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Since the function, Today(), is encapsulated by the single quotes, QlikView treats it as a string.&amp;nbsp; After running the script and from the Variable Overview in the Settings menu, you will find it is holding a string ‘Today()’.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;In the Edit Script, if you are assigning variables with ‘Set’, QlikView will store whatever you typed in as a string.&amp;nbsp; If you assigned a formula in a variable, and you want to use it in QlikView you need to use dollar sign expansion.&amp;nbsp; However, if you assigned an equal sign in the beginning of the string, for example, “=Today() + 7″, you can just use the variable name without Dollar sign expansion since the variable will evaluate the formula and be represented as if it were a number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you are assigning variables with ‘Let’, you have to encapsulate the formula in between single quotes ( ‘ ).&amp;nbsp; If you use double quotes, the variable gets a null value and the variable will not be created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you want to create a variable which hold a dollar sign expansion, then you need to separates the equation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Examples&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vStartDate = Today();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vEndDate = Date(Today()+7);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vSales = ‘Sum({$&amp;lt;Date={“&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)”}&amp;gt;} Sales)’&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you run the script, you will get ‘Sum({$&amp;lt;Date={“&amp;gt;=12/1/2012&amp;lt;=12/8/2012″}&amp;gt;} Sales)’ for the variable vSales.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you don’t want to expand the Dollar sign expansion part, you need to separate above formula in three parts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vSales2 = ‘Sum({$&amp;lt;Date={“&amp;gt;=$’ &amp;amp; ‘(vStartDate)&amp;lt;=$’ &amp;amp; ‘(vEndDate)”}&amp;gt;} Sales)’&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;You will get ‘Sum({$&amp;lt;Date={“&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)”}&amp;gt;} Sales)’ for the variable vSales2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you are using single quotes in the formula, then you need to use chr(39).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vSales3 = ‘Num(Sum({$&amp;lt;Date={“&amp;gt;=$’ &amp;amp; ‘(vStartDate)&amp;lt;=$’ &amp;amp; ‘(vEndDate)”}&amp;gt;} Sales), ‘ &amp;amp; chr(39) &amp;amp; ‘##,##0′&amp;amp; chr(39) &amp;amp; ‘)’&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;You will get ‘Num(Sum({$&amp;lt;Date={“&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)”}&amp;gt;} Sales), ‘##,##0′)’.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;That’s it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;SET Vstring3=1+3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Vstring4=1+3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;set Vif=if(year=2006,year);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let Vstring5=today();//expression evaluates&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Vstring6='today()';//store string if u use $(Vstring6) evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;set Vstring7=today(); //store string if u use $(Vstring7) evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;set Vstring8="=today()";//evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Vstring9='=today()';//evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Ver='if(year=2006,year,0)';//use string and evaluates expression also&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let Vstring8="=today()"; //it's value is null variable not created.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2014 08:45:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-05-08T08:45:35Z</dc:date>
    <item>
      <title>Difference between LET and SET?</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626571#M1098023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Arial','sans-serif';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 14.0pt; font-family: 'Arial','sans-serif';"&gt;Difference between LET and SET?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626571#M1098023</guid>
      <dc:creator />
      <dc:date>2014-05-08T08:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between LET and SET?</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626572#M1098024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let and Set commands are used to define Script Variables. Any text or numeric value can be assigned to the script variables.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Examples:&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; 1.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set V = $ ; ( Set- assigns the variable(V) the text(String) to the right of the equal sign)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vStart = num(makedate(2011)); (Let- evaluates the expression)&lt;/P&gt;&lt;P&gt; &lt;BR /&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; 2.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set MUL = ’$1*$2’;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set X = $(MUL(3,7));&amp;nbsp;&amp;nbsp; // returns '3*7' in X&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let X = $(MUL(3,7));&amp;nbsp;&amp;nbsp; // returns 21 in X&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:29:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626572#M1098024</guid>
      <dc:creator>ThornOfCrowns</dc:creator>
      <dc:date>2014-05-08T08:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between LET and SET?</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626573#M1098025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;A variable is an entity used to contain a single data value which can be a number, a character or a string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;The variable acquires its value from LET or SET in the Script or from an Input Box in a layout which can be set by users.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;There are few ways to create variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;1. Variables Tab in the Document Properties&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;2. New Variables in New Input Box Properties&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;3. Variable Overview in Settings Menu&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;4. Using ‘SET’ or ‘LET’ in Edit Script&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; text-align: justify; font-size: 10pt; font-style: inherit; margin-bottom: 0.0001pt; font-family: Verdana, sans-serif; font-weight: inherit;"&gt;If the first character of the string starts with an equal sign ‘ = ‘, QlikView evaluates it as a formula and stores the evaluated result in it. Otherwise, it holds the value as a string.&amp;nbsp; You can store a formula with equal sign in front, then you can just use the variable in the expression without Dollar Sign Expansion, if it is storing a string as a formula, then you need to use the Dollar Sign Expansion: ‘$(variablename)’.&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; list-style-type: lower-roman; color: #3d3d3d;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;i.e. Let’s create two variables: vString1 and vString2.&amp;nbsp; vString1 stores a string ’1+3′ and vString2 stores a string ‘=1+3′.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Create a new Text Object and type ‘=vString1′, you will see ’1+3′ in the text object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Then create another Text Object and type in ‘=$(vString1), then Dollar Sign Expansion evaluates the formula and you will get ’4′.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Then create another Text box and type in ‘=vString2′, you will see ’4′ in it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;‘LET’ and ‘SET’ are used for defining Variables in the script.&amp;nbsp; The variables can be used for substituting strings, paths, drives, etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;‘SET’ treats everything after the equal sign (=) as String.&amp;nbsp; If it contains space, then you need double quote in the beginning and the end.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;The syntax is: set variablename=string&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Examples:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Set FileToUse=Data1.csv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Set Constant=”My string”;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Set BudgetYear=1997;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;‘LET’ evaluates the expression after the equal sign (=) and stores the value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;The syntax is: let variablename=expression&amp;nbsp; (Note: the word ’let’ can be omitted. )&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Examples&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let x=Today(); &amp;gt;&amp;gt; x=12/01/2012&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let y=’Today()’; &amp;gt;&amp;gt; y=Today()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Since the function, Today(), is encapsulated by the single quotes, QlikView treats it as a string.&amp;nbsp; After running the script and from the Variable Overview in the Settings menu, you will find it is holding a string ‘Today()’.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;In the Edit Script, if you are assigning variables with ‘Set’, QlikView will store whatever you typed in as a string.&amp;nbsp; If you assigned a formula in a variable, and you want to use it in QlikView you need to use dollar sign expansion.&amp;nbsp; However, if you assigned an equal sign in the beginning of the string, for example, “=Today() + 7″, you can just use the variable name without Dollar sign expansion since the variable will evaluate the formula and be represented as if it were a number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you are assigning variables with ‘Let’, you have to encapsulate the formula in between single quotes ( ‘ ).&amp;nbsp; If you use double quotes, the variable gets a null value and the variable will not be created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you want to create a variable which hold a dollar sign expansion, then you need to separates the equation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Examples&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vStartDate = Today();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vEndDate = Date(Today()+7);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vSales = ‘Sum({$&amp;lt;Date={“&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)”}&amp;gt;} Sales)’&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you run the script, you will get ‘Sum({$&amp;lt;Date={“&amp;gt;=12/1/2012&amp;lt;=12/8/2012″}&amp;gt;} Sales)’ for the variable vSales.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you don’t want to expand the Dollar sign expansion part, you need to separate above formula in three parts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vSales2 = ‘Sum({$&amp;lt;Date={“&amp;gt;=$’ &amp;amp; ‘(vStartDate)&amp;lt;=$’ &amp;amp; ‘(vEndDate)”}&amp;gt;} Sales)’&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;You will get ‘Sum({$&amp;lt;Date={“&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)”}&amp;gt;} Sales)’ for the variable vSales2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;If you are using single quotes in the formula, then you need to use chr(39).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let vSales3 = ‘Num(Sum({$&amp;lt;Date={“&amp;gt;=$’ &amp;amp; ‘(vStartDate)&amp;lt;=$’ &amp;amp; ‘(vEndDate)”}&amp;gt;} Sales), ‘ &amp;amp; chr(39) &amp;amp; ‘##,##0′&amp;amp; chr(39) &amp;amp; ‘)’&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;You will get ‘Num(Sum({$&amp;lt;Date={“&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)”}&amp;gt;} Sales), ‘##,##0′)’.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;That’s it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;SET Vstring3=1+3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Vstring4=1+3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;set Vif=if(year=2006,year);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let Vstring5=today();//expression evaluates&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Vstring6='today()';//store string if u use $(Vstring6) evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;set Vstring7=today(); //store string if u use $(Vstring7) evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;set Vstring8="=today()";//evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Vstring9='=today()';//evaluates expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;let Ver='if(year=2006,year,0)';//use string and evaluates expression also&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-align: justify;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Verdana, sans-serif;"&gt;Let Vstring8="=today()"; //it's value is null variable not created.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:45:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626573#M1098025</guid>
      <dc:creator />
      <dc:date>2014-05-08T08:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between LET and SET?</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626574#M1098026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use SET &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;Set vVariableName = $ ;&amp;nbsp; //It will treat as static strin which kept $ sign&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;and if you use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;Let vToday = Num(Today()); // then this variable store today date as number and it will changed as today value change you can use&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;Let vNow = Num(Now());&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;Or&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;Let vNow = Now();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;and as James suggest&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;SET Add = '$1+$2';&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;LET vADD = $(Add(5,6)); //this gives 11&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;But if you use&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;SET vADD = $(Add(5,6)); //this gives '5+6'&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:50:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626574#M1098026</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-08T08:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between LET and SET?</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626575#M1098027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:&lt;STRONG&gt;SET :&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;The SET statement is used when you want a variable to hold the string or numeric value that is to the right of the Equal (=) sign.&lt;/P&gt;&lt;P&gt;When used, the variable is substituted by its value. &lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;Variables can be used in the script for macro expansion and in various control statements. &lt;/LI&gt;&lt;LI&gt;This is very useful if the same string is repeated many times in the script, e.g. a path.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set variable = string&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Eg : Set Myvar=2*3 returns “ 2*3”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt; : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The let statement, in opposition to the set statement, evaluates the expression on the right side of the ' =' before it is assigned to the macro variable.&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;Let variable = Expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Eg : Let MyVar =2*3 returns “6”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bregards,&lt;/P&gt;&lt;P&gt;Reena Abraham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 09:03:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626575#M1098027</guid>
      <dc:creator />
      <dc:date>2014-05-08T09:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between LET and SET?</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626576#M1098028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 09:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-LET-and-SET/m-p/626576#M1098028</guid>
      <dc:creator />
      <dc:date>2014-05-08T09:05:19Z</dc:date>
    </item>
  </channel>
</rss>

