<?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: How to use variable in set expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075216#M358780</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$ &amp;lt;ReportingWeekStart={'$(vSelectionWeekStart)'} &amp;gt;} Account)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$ &amp;lt;ReportingWeekStart={'$(=vSelectionWeekStart)'} &amp;gt;} Account)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 May 2016 16:36:00 GMT</pubDate>
    <dc:creator>settu_periasamy</dc:creator>
    <dc:date>2016-05-04T16:36:00Z</dc:date>
    <item>
      <title>How to use variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075215#M358779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to calculate a count from the most recent week of data. I am able to accomplish this by hard coding the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$ &amp;lt;ReportingWeekStart={'4/24/2016'} &amp;gt;} Account)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I define a variable&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vSelectionWeekStart &lt;/SPAN&gt;= date(WeekStart(max(ReportingDate)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and display the variable in a text box to make sure it is working...so it displays as "4/24/2016"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, this expression below returns a count of the entire current selection, not just the most recent week:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; count({$ &amp;lt;ReportingWeekStart={"=$(=vSelectionWeekStart)"} &amp;gt;} &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Account)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 14:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075215#M358779</guid>
      <dc:creator>daveatkins</dc:creator>
      <dc:date>2016-05-04T14:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075216#M358780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$ &amp;lt;ReportingWeekStart={'$(vSelectionWeekStart)'} &amp;gt;} Account)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$ &amp;lt;ReportingWeekStart={'$(=vSelectionWeekStart)'} &amp;gt;} Account)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 16:36:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075216#M358780</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-05-04T16:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075217#M358781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&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;STRONG&gt;Count({$&amp;lt;ReportingWeekStart={'$(=vSelectionWeekStart)'}&amp;gt;} &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Account)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&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;STRONG&gt;Count({$&amp;lt;ReportingWeekStart={'$(=$(vSelectionWeekStart))'}&amp;gt;} &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Account)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 16:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075217#M358781</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T16:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075218#M358782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it appears the second one works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({$&amp;lt;ReportingWeekStart={'$(=$(vSelectionWeekStart))'}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;the first does not. now, if only I understood why? I have a few others like this on the same report...will see how it goes.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 16:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075218#M358782</guid>
      <dc:creator>daveatkins</dc:creator>
      <dc:date>2016-05-04T16:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use variable in set expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075219#M358783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess what you need is to replace 4/24/2016 with an expression. To do that first step is to get the variable to expand to a correct number in a text box object. In your case, I am guessing that if you put &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vSelectionWeekStart)&lt;/STRONG&gt; in a text box object you will see 04/24/2016. I just moved that within the dollar sign expansion -&amp;gt; $(=&lt;STRONG&gt;Whatever works in text box&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 16:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-variable-in-set-expression/m-p/1075219#M358783</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T16:55:15Z</dc:date>
    </item>
  </channel>
</rss>

