<?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: Set Analysis variable with parameters? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332987#M492159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wilfredo,&lt;/P&gt;&lt;P&gt;I used the variable in charts like so:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sum($(vDateSetAnalysisExpr('1/1/2012')) Revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;to get the sum of revenue for just 1/1/2012, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 01:16:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-02T01:16:23Z</dc:date>
    <item>
      <title>Set Analysis variable with parameters?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332983#M492155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make a set analysis variable that takes a parameter, so I can pass in any date I want.&lt;/P&gt;&lt;P&gt;Like so:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;vDateSetAnalysisExpr = {$ &amp;lt;Year=, Month=, Week=, Date={'$1'}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And then I would use it like so:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sum($(vDateSetAnalysisExpr('1/1/2012')) Revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I haven't been able to get it to work. If I use the same set analysis expression variable using a literal &lt;SPAN style="font-family: 'courier new', courier;"&gt;'1/1/2012'&lt;/SPAN&gt; in the variable itself, it works just fine.&lt;/P&gt;&lt;P&gt;Any thoughts on if this is possible, and if so how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Simon-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 19:08:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332983#M492155</guid>
      <dc:creator />
      <dc:date>2012-08-01T19:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis variable with parameters?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332984#M492156</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If so, can you check the format for date? its also in dd/mm/yyyy format?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 19:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332984#M492156</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-08-01T19:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis variable with parameters?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332985#M492157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found my problem...&lt;/P&gt;&lt;P&gt;In the set analysis variable, where i had &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Date={'$1'} //&amp;lt;-- WRONG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I should have had&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Date={$1} //&amp;lt;-- RIGHT - no quotes!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*sigh*&lt;/P&gt;&lt;P&gt;Thanks Mayil!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 19:55:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332985#M492157</guid>
      <dc:creator />
      <dc:date>2012-08-01T19:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis variable with parameters?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332986#M492158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where did you write the expansion variable, in the script?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;vDateSetAnalysisExpr = {$ &amp;lt;Year=, Month=, Week=, Date={$1}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 21:43:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332986#M492158</guid>
      <dc:creator>wgonzalez</dc:creator>
      <dc:date>2012-08-01T21:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis variable with parameters?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332987#M492159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wilfredo,&lt;/P&gt;&lt;P&gt;I used the variable in charts like so:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sum($(vDateSetAnalysisExpr('1/1/2012')) Revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;to get the sum of revenue for just 1/1/2012, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 01:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332987#M492159</guid>
      <dc:creator />
      <dc:date>2012-08-02T01:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis variable with parameters?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332988#M492160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And if I want to use it with a variable, I can do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sum($(vDateSetAnalysisExpr('$(=date(v3WeeksBack))')) Revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found it necessary to do this even if the variable (&lt;SPAN style="font-family: 'courier new', courier;"&gt;v3WeeksBack &lt;/SPAN&gt;in this case) is already a date. Putting it in a dollar expansion with an eqauls sign &lt;SPAN style="font-family: 'courier new', courier;"&gt;$(=date(v3WeeksBack))&lt;/SPAN&gt; forces it to be evaluated before being passed to the set analysis variable as a parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 01:47:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-variable-with-parameters/m-p/332988#M492160</guid>
      <dc:creator />
      <dc:date>2012-08-02T01:47:34Z</dc:date>
    </item>
  </channel>
</rss>

