<?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: Date Range Set Expression not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685953#M248544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;true, if you did a good job in the data modelling. But I was just making sure &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Aug 2014 12:32:02 GMT</pubDate>
    <dc:creator>giakoum</dc:creator>
    <dc:date>2014-08-15T12:32:02Z</dc:date>
    <item>
      <title>Date Range Set Expression not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685950#M248541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use a set expression in my QlikVIew document to calculate the sales within a date range. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calculating the sales amount based on what date the user selects and the beginning date of that date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the user selects 14/08/2014 then the beginning date of the month of that date would 01/08/2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My aim is to calculate the sales between the first date of the month (01/08/2014) and the date selected (04/08/2014) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created two variables:&lt;/P&gt;&lt;P&gt;1. vThisMonthStart. This carries out the expression MONTHSTART(DATE(SALEDATE)) &lt;/P&gt;&lt;P&gt;2. vMaxSalesDate: This carries out the expression MAX(DATE(SALESDATE))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These variables were created in document and not in script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My date range Expression is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;SALESDATE={'=DATE(vThisMonthStart)&amp;lt;=DATE(vMaxSalesDate)'} &amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above expression is used in a table or pivot table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally when I select the date range from a list box, I get the correct sum of sales when I verify them from a database. &lt;/P&gt;&lt;P&gt;So I selected 01/08/2014 TO 13/08/2014 and the total sales was correct and verified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am expecting to just select one date (13/08/2014) and my expression should show the sales from 01/08/2014 TO 13/08/2014. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting this result rather I am getting just the sales for that day (13/08/2014)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong in my set expression? &lt;/P&gt;&lt;P&gt;How can I fix this to get the result I want? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 12:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685950#M248541</guid>
      <dc:creator />
      <dc:date>2014-08-15T12:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Set Expression not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685951#M248542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to ley QV know that it needs to calculate by using the $ sign :&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;"&gt;sum({&amp;lt;SALESDATE={'&amp;gt;=$(=DATE(vThisMonthStart, 'YYYY-MM-DD'))&amp;lt;=$(=DATE(vMaxSalesDate&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;, 'YYYY-MM-DD'&lt;/SPAN&gt;))'} &amp;gt;} SALES)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&gt;hope I got the parenthesis right!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 12:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685951#M248542</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2014-08-15T12:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Set Expression not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685952#M248543</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;This worked fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You do not need the date format in the DATE function. Just the DATE function itself. &lt;/P&gt;&lt;P&gt;Thank you. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 12:25:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685952#M248543</guid>
      <dc:creator />
      <dc:date>2014-08-15T12:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range Set Expression not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685953#M248544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;true, if you did a good job in the data modelling. But I was just making sure &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 12:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Range-Set-Expression-not-working/m-p/685953#M248544</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2014-08-15T12:32:02Z</dc:date>
    </item>
  </channel>
</rss>

