<?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 Why $ used in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243313#M850452</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 recently started working with set Analysis.&lt;/P&gt;&lt;P&gt;I found out 2 different syntax for that.&lt;/P&gt;&lt;P&gt;1. Sum({&amp;lt;Region={'North'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;2. Sum(${&amp;lt;Region={'North'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why $ sign we use in 2nd statement. what is use of that? If it throws same answer why we use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in adv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Why $ used in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243313#M850452</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 recently started working with set Analysis.&lt;/P&gt;&lt;P&gt;I found out 2 different syntax for that.&lt;/P&gt;&lt;P&gt;1. Sum({&amp;lt;Region={'North'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;2. Sum(${&amp;lt;Region={'North'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why $ sign we use in 2nd statement. what is use of that? If it throws same answer why we use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in adv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243313#M850452</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why $ used in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243314#M850453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$ denotes the default state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both expression differ when you are using alternate states, then the first expression without $ refers to the inherited state (which could be different from default).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 13:37:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243314#M850453</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-03-07T13:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why $ used in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243315#M850454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan Wuhl, is it only thing that we use $ in it? or something else ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 13:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243315#M850454</guid>
      <dc:creator />
      <dc:date>2017-03-07T13:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why $ used in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243316#M850455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As set analysis usually refers to current selections, if there is not any set in a explicit way, the default is current selections. I think is a way of prevent errors or make it simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 13:40:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243316#M850455</guid>
      <dc:creator>hector_munoz</dc:creator>
      <dc:date>2017-03-07T13:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why $ used in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243317#M850456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am really sorry that I unable to understand these terms as I am new to set analysis. Would you please elaborate with example. Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 13:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243317#M850456</guid>
      <dc:creator />
      <dc:date>2017-03-07T13:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why $ used in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243318#M850460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from Help &lt;/P&gt;&lt;H1&gt;&lt;A name="kanchor577"&gt;&lt;/A&gt;Dollar-Sign Expansions&lt;/H1&gt;&lt;P&gt;Dollar-sign expansions are definitions of text replacements used in the script or in expressions. This process is known as expansion - even if the new text is shorter. The replacement is made just before the script statement or the expression is evaluated. Technically it is a macro expansion. &lt;/P&gt;&lt;P&gt;A macro expansion always begins with '$(' and ends with ') ' and the content between brackets defines how the text replacement will be done. To avoid confusion with script macros we will henceforth refer to macro expansions as dollar-sign expansions. &lt;/P&gt;&lt;P class="note"&gt;&lt;SPAN class="Bold"&gt;Note!&lt;/SPAN&gt; &lt;BR /&gt;Macro expansion is unrelated to script macros (VB or Java script defined in the script module). &lt;/P&gt;&lt;P class="note"&gt;&lt;SPAN class="Bold"&gt;Note!&lt;/SPAN&gt; &lt;BR /&gt;A dollar-sign expansion is limited in how many macro expansions it can calculate. Any expansion over 1000 will not be calculated!&lt;/P&gt;&lt;H2&gt;Dollar-Sign Expansion Using a Variable&lt;/H2&gt;&lt;P&gt;When using a variable for text replacement in the script or in an expression, the following syntax is used:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;$&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;( variablename )&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;$&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;( variablename)&lt;/SPAN&gt; expands to the value in &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt;. If &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt; does not exist the expansion will be the empty string. &lt;/P&gt;&lt;P&gt;For numeric variable expansions, the syntax &lt;SPAN class="Bold"&gt;$&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;( variablename )&lt;/SPAN&gt; will generate a number using the regional decimal separator, i.e. for many countries a decimal comma. Such an expansion should not be used for numbers inside the script since these must use decimal point. Instead the expansion $(# variablename ) should be used. (Note the hash sign). It always yields a valid decimal-point representation of the numeric value of &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt;, possibly with exponential notation (for very large/small numbers). If &lt;SPAN class="Italic"&gt;variablename&lt;/SPAN&gt; does not exist or does not contain a numeric value, it will be expanded to &lt;SPAN class="Italic"&gt;0&lt;/SPAN&gt; instead. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P style="font-style: italic;"&gt;After execution of the following script:&lt;/P&gt;&lt;P class="Code"&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P class="Code"&gt;LET X = 7/2;&lt;/P&gt;&lt;P&gt;$(X ) will expand to 3,5 while $(#X ) will expand to 3.5. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;set Mypath=C:\MyDocs\Files\&lt;/P&gt;&lt;P class="Code"&gt;... &lt;/P&gt;&lt;P class="Code"&gt;load * from $(MyPath)abc.csv;&lt;/P&gt;&lt;P class="Code"&gt;set CurrentYear=1992;&lt;/P&gt;&lt;P class="Code"&gt;... &lt;/P&gt;&lt;P class="Code"&gt;select * from table1 where Year=$(CurrentYear);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Dollar-Sign Expansion with Parameters&lt;/H2&gt;&lt;P&gt;Parameters can be used in variable expansions. The variable must then contain formal parameters, such as $1, $2, $3 etc. When expanding the variable, the parameters should be stated in a comma separated list. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;set MUL=’$1*$2’;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(3,7)); //&lt;/SPAN&gt; returns '3*7' in X&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;let X=$(MUL(3,7)); //&lt;/SPAN&gt; returns 21 in X&lt;/P&gt;&lt;P&gt;If the number of formal parameters exceeds the number of actual parameters only the formal parameters corresponding to actual parameters will be expanded. If the number of actual parameters exceeds the number of formal parameters the superfluous actual parameters will be ignored. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;set MUL=’$1*$2’;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL); //&lt;/SPAN&gt; returns '$1*$2' in X&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(10)); //&lt;/SPAN&gt; returns '10*$2' in X&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;let X=$(MUL(5,7,8)); //&lt;/SPAN&gt; returns 35 in X &lt;/P&gt;&lt;P&gt;The parameter $0 returns the number of parameters actually passed by a call. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P class="Code"&gt;set MUL='$1*$2 $0 par'; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(3,7)); //&lt;/SPAN&gt; returns '3*7 2 par' in X &lt;/P&gt;&lt;H2&gt;Dollar-Sign Expansion with an Expression&lt;/H2&gt;&lt;P&gt;Expressions can be used in dollar-sign expansions. The content between the brackets must then start with an equal sign: &lt;/P&gt;&lt;P&gt;$( =expression )&lt;/P&gt;&lt;P&gt;The expression will be evaluated and the value will be used in the expansion. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;$(=Year(Today())); //&lt;/SPAN&gt; returns e.g. '2008'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;$(=Only(Year)-1); //&lt;/SPAN&gt; returns the year before the selected one&lt;/P&gt;&lt;H3&gt;Dollar-Sign Expansion of File - Include Statement&lt;/H3&gt;&lt;P&gt;File inclusions are made using dollar-sign expansions. The syntax is then:&lt;/P&gt;&lt;P&gt;$( include=filename )&lt;/P&gt;&lt;P&gt;The above text will be replaced by the content of the file specified after the equal sign. This feature is very useful when storing scripts or parts of scripts in text files. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P class="Code"&gt;$(include=C:\Documents\MyScript.qvs);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 14:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-used-in-Set-Analysis/m-p/1243318#M850460</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-03-07T14:04:10Z</dc:date>
    </item>
  </channel>
</rss>

