<?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: Use variables in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167087#M379835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its a small app so performance isnt a issue. I'll go with now() for now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2016 09:22:27 GMT</pubDate>
    <dc:creator>t_hylander</dc:creator>
    <dc:date>2016-08-01T09:22:27Z</dc:date>
    <item>
      <title>Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167074#M379822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ive got a couple of charts that uses the same selections in their set analysis and I thought Id use a variable instead so I can change them all from one place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex.&lt;/P&gt;&lt;P&gt;count({&amp;lt;customer={'1001','1002','1003'}, type -= {'10','20'} &amp;gt;} orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What Id like is to replace the whole line and in some cases add more selection so it might look something like this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;$(vCustomerTypeSelection), artnr={'2423','4222'} &amp;gt;} orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible, or do I have to settle with two variables contaning just the "numbers" (in the above case)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;/Tomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167074#M379822</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2016-07-28T09:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167075#M379823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this should be possible:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Count({&amp;lt;$(vCustomerTypeSelection), artnr={'2423','4222'} &amp;gt;} orders)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only issue would be the syntax editor won't understand the syntax, but that should not stop you from getting the same result as this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Count({&amp;lt;customer={'1001','1002','1003'}, &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; artnr={'2423','4222'}&lt;/STRONG&gt;&amp;gt;} orders)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:49:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167075#M379823</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-28T10:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167076#M379824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is possible and I did used in various applications..&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count({&amp;lt;$(vCustomerTypeSelection), artnr={'2423','4222'} &amp;gt;} orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167076#M379824</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-07-28T10:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167077#M379825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I havnt used varables much, how would the set/let look like for it to work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 11:00:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167077#M379825</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2016-07-28T11:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167078#M379826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ive now also having trouble using dates...&lt;/P&gt;&lt;P&gt;In load-script I have this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let vCurrYear&amp;nbsp; = Year(now());&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Let vCurrMonth&amp;nbsp; = month(now());&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Let vCurrWeek&amp;nbsp; = week(now());&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Let vCurrDay = date(now());&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in a simple text-object I tested with this;&amp;nbsp; (and a couple of other variants)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({1&amp;lt;%Date={'${=$(vCurrDay)}'}&amp;gt;}Transnr) &lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;This just shows a '0' (where I know it should display '11')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year, month and week works as they should, like this;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({1&amp;lt;År={$(vCurrYear)}&amp;gt;}Transnr)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Date is a key to a calendar and its content is like '2016-07-29' (the same as 'date(now())' is)&lt;/P&gt;&lt;P&gt;Ive also tried;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({1&amp;lt;%Date={=date(now())} &amp;gt;}Transnr) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but it generates the error "Error in the set modifier ad hoc element list: ',' or ')' expected"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clues?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 09:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167078#M379826</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2016-07-29T09:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167079#M379827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample where you might be testing all this out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 09:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167079#M379827</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-29T09:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167080#M379828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I havnt used varables much, how would the set/let look like for it to work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vCustomerTypeSelection = customer={'1001','1002','1003'};&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 09:46:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167080#M379828</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-07-29T09:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167081#M379829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tomas, about the dates...&lt;/P&gt;&lt;P&gt;count({1&amp;lt;%Date={'${=$(vCurrDay)}'}&amp;gt;}Transnr) --&amp;gt; try:&lt;/P&gt;&lt;P&gt;count({1&amp;lt;%Date={&lt;STRONG&gt;'$(vCurrDay)'&lt;/STRONG&gt;}&amp;gt;}Transnr) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count({1&amp;lt;%Date={=date(now())} &amp;gt;}Transnr) --&amp;gt; try:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count({1&amp;lt;%Date={&lt;STRONG&gt;'$(=date(now()))'&lt;/STRONG&gt;}&amp;gt;}Transnr)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 09:49:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167081#M379829</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-07-29T09:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167082#M379830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried but didnt work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 09:58:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167082#M379830</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2016-07-29T09:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167083#M379831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems to be working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/132996_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 11:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167083#M379831</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-29T11:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167084#M379832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tomas, your date field is called transdate, set analysis is asigned to a field.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Also the number field is transnr (all lowercase), try with: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({1&amp;lt;transdate={'$(vCurrDay)'}&amp;gt;}transnr) &amp;amp; chr(13) &amp;amp;&lt;/P&gt;&lt;P&gt;count({1&amp;lt;transdate={'$(=date(now()))'}&amp;gt;}transnr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: As Sunny posted above, if you only want the date, is better to use Today() instead of Now().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 11:01:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167084#M379832</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-07-29T11:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167085#M379833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, I was inconsistent with names and sloppy when I made the exemple...in the exemple it works yes.&lt;/P&gt;&lt;P&gt;But...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to you I got this to work;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({1&amp;lt;%Date={'$(=date(now()))'}&amp;gt;}Transnr)&lt;/STRONG&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;but this doesnt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({1&lt;/STRONG&gt;&lt;STRONG&gt;&amp;lt;%Date = {"$(=Date(Today()))"}&amp;gt;} Transnr&lt;/STRONG&gt;&lt;STRONG&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let vCurrDay = date(now()); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({1&amp;lt;%Date={'$(vCurrDay)'}&amp;gt;} Transnr) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it all works now but not with "let vCurrDay = today()" or "date(today())"&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 11:52:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167085#M379833</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2016-07-29T11:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167086#M379834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tomas, Now() and Today() can have a parameter wich tells the date to return based on:&lt;/P&gt;&lt;P&gt;0 - Script execution&lt;/P&gt;&lt;P&gt;1 - Function call&lt;/P&gt;&lt;P&gt;2 - Document opened &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Default for Today() is '2', default for Now() is '1', the thing with option '1' is that system clock changes so often that it can cause an impact on performance, but this is when expression are related between them, usually it works fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also test in a text box if there is a difference, create a text box with =Date(Now()) and another with =Date(Today()).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the same result with both so I don't know why Today() isn't working for you, maybe a typo? Anyway, i&lt;SPAN style="font-size: 13.3333px;"&gt;f Now() gives a good performance keep them.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 12:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167086#M379834</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-07-29T12:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Use variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167087#M379835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its a small app so performance isnt a issue. I'll go with now() for now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 09:22:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variables-in-set-analysis/m-p/1167087#M379835</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2016-08-01T09:22:27Z</dc:date>
    </item>
  </channel>
</rss>

