<?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: Variables in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980788#M468377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it doesn't matter (#) in your case.&lt;/P&gt;&lt;P&gt;This is from Qlik Reference Manual&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dollar-Sign Expansion Using a Variable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When using a variable for text replacement in the script or in an expression, the following syntax is used:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$( variablename )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$( variablename) expands to the value in variablename. If variablename does not exist the expansion will&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;be the empty string.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For numeric variable expansions, the syntax $( variablename ) will generate a number using the regional decimal&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;separator, i.e. for many countries a decimal comma. Such an expansion should not be used for numbers&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;inside the script since these must use decimal point. Instead the expansion $(# variablename ) should be&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;used. (Note the hash sign). It always yields a valid decimal-point representation of the numeric value of variablename,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;possibly with exponential notation (for very large/small numbers). If variablename does not exist&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;or does not contain a numeric value, it will be expanded to 0 instead.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;After execution of the following script:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SET DecimalSep=',';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LET X = 7/2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;$(X ) will expand to 3,5 while $(#X ) will expand to 3.5.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Sep 2015 07:03:53 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2015-09-06T07:03:53Z</dc:date>
    <item>
      <title>Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980784#M468373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ok, how do I incorporate variables in this?&amp;nbsp; I want to incorporate my variables vStartDate and VEndDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Scenario='Actual',(only({$&amp;lt;Month_Year={'&amp;gt;=1/1/13&amp;lt;=3/1/15'}&amp;gt;}[Price per Unit])),only({$}[Price per Unit]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I've tried replacing the hard coded dates with my variables but that does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2015 19:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980784#M468373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-05T19:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980785#M468374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you used dollar expansion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;{'$(vStartDate)'}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2015 21:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980785#M468374</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-09-05T21:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980786#M468375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure your expression works? I have some doubt about&lt;/P&gt;&lt;P&gt;- only&lt;/P&gt;&lt;P&gt;- Month_Year field with start/end date variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Scenario='Actual',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; only({&amp;lt;Date={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}&amp;nbsp; [Price per Unit]),&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;[Price per Unit]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2015 21:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980786#M468375</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-09-05T21:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980787#M468376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why exactly but this works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Scenario='Actual',(only({$&amp;lt;Month_Year={'&amp;gt;=$(#=vStartDate)&amp;lt;=$(#=vActEndDate)'}&amp;gt;}[Price per Unit])),only({$}[Price per Unit]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw #= used in another thread on this site for something similar.&amp;nbsp; What does the #= do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 00:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980787#M468376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-06T00:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980788#M468377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it doesn't matter (#) in your case.&lt;/P&gt;&lt;P&gt;This is from Qlik Reference Manual&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dollar-Sign Expansion Using a Variable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When using a variable for text replacement in the script or in an expression, the following syntax is used:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$( variablename )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$( variablename) expands to the value in variablename. If variablename does not exist the expansion will&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;be the empty string.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For numeric variable expansions, the syntax $( variablename ) will generate a number using the regional decimal&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;separator, i.e. for many countries a decimal comma. Such an expansion should not be used for numbers&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;inside the script since these must use decimal point. Instead the expansion $(# variablename ) should be&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;used. (Note the hash sign). It always yields a valid decimal-point representation of the numeric value of variablename,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;possibly with exponential notation (for very large/small numbers). If variablename does not exist&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;or does not contain a numeric value, it will be expanded to 0 instead.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;After execution of the following script:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SET DecimalSep=',';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LET X = 7/2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;$(X ) will expand to 3,5 while $(#X ) will expand to 3.5.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 07:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980788#M468377</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-09-06T07:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980789#M468378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does seem to matter.&amp;nbsp; It doesn't work without the #=.&amp;nbsp; It doesn't work without the = or without the #.&amp;nbsp; The formula needs both.&amp;nbsp; Anybody know what this combo means?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 14:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980789#M468378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-06T14:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980790#M468379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you post your .qvw?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 15:48:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980790#M468379</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-09-06T15:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980791#M468380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Scenario='Actual',(only({$&amp;lt;&lt;STRONG&gt;Month_Year&lt;/STRONG&gt;={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}[Price per Unit])),only({$}[Price per Unit]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where ,&lt;/P&gt;&lt;P&gt;vStartDate =date(date#('1/1/13','MM/DD/YYYY'),'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;vEndDate =date(date#('3/1/13','MM/DD/YYYY'),'MM/DD/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 18:43:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980791#M468380</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-09-06T18:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980792#M468381</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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; I think u can use it,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Scenario='Actual',(only({$&amp;lt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Month_Year&lt;/STRONG&gt;={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}[Price per Unit])),only({$}[Price per Unit]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where ,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vStartDate =date(date#('1/1/13','MM/DD/YYYY'),'MM/DD/YYYY')&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vEndDate =date(date#('3/1/13','MM/DD/YYYY'),'MM/DD/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 06:10:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980792#M468381</guid>
      <dc:creator />
      <dc:date>2015-09-07T06:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980793#M468382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its proprietary data but I will create one with fake data and post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 15:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/980793#M468382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-08T15:42:49Z</dc:date>
    </item>
  </channel>
</rss>

