<?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 Set Analysis syntax - sum sales between dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax-sum-sales-between-dates/m-p/150632#M28615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your syntax is a little off. First, you can't use &amp;gt;= or &amp;lt;= where you are. There, you need a Set Operator. Replace those with equal signs.&lt;/P&gt;&lt;P&gt;You're also missing the brackets around your Set Modifiers.&lt;/P&gt;&lt;P&gt;Then you need to do the greater than or equal and the date expression inside a dollar sign expansion. Dates seem to be the most difficult to get right when doing Set Analysis for me. I usually end up trying out a few different things before getting it right.&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({&amp;lt;SALE_DT = {'&amp;gt;= $(=AddMonths(MakeDate(Year(Now()), Month(Now()), '01'), -12))},&lt;BR /&gt;SALE_DT = {'&amp;lt;= $(MakeDate(Year(Now()), Month(Now()), '01'))}&amp;gt;} SALES_AMT)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2009 23:42:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-29T23:42:24Z</dc:date>
    <item>
      <title>Set Analysis syntax - sum sales between dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax-sum-sales-between-dates/m-p/150631#M28614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;BR /&gt;Am wondering if someone can assist with the below set analysis syntax?&lt;/P&gt;&lt;P&gt;sum(&lt;BR /&gt;{&lt;BR /&gt;&amp;lt;&lt;BR /&gt;SALE_DT &amp;gt;= AddMonths(MakeDate(Year(Now()), Month(Now()), '01'), -12)&lt;BR /&gt;,&lt;BR /&gt;SALE_DT &amp;lt;= MakeDate(Year(Now()), Month(Now()), '01')&lt;BR /&gt;&amp;gt;&lt;BR /&gt;}&lt;BR /&gt;SALES_AMT&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;I need to get the sum of sales between the sales date range of&lt;/P&gt;&lt;P&gt;01/JUNE/2008 and 01/JUL/2009&lt;/P&gt;&lt;P&gt;Unfortunately Qlikview 8.5 does not flag if Set analysis syntax is incorrect or have a query builder for set analysis.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Kevin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 23:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax-sum-sales-between-dates/m-p/150631#M28614</guid>
      <dc:creator />
      <dc:date>2009-07-29T23:24:37Z</dc:date>
    </item>
    <item>
      <title>Set Analysis syntax - sum sales between dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax-sum-sales-between-dates/m-p/150632#M28615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your syntax is a little off. First, you can't use &amp;gt;= or &amp;lt;= where you are. There, you need a Set Operator. Replace those with equal signs.&lt;/P&gt;&lt;P&gt;You're also missing the brackets around your Set Modifiers.&lt;/P&gt;&lt;P&gt;Then you need to do the greater than or equal and the date expression inside a dollar sign expansion. Dates seem to be the most difficult to get right when doing Set Analysis for me. I usually end up trying out a few different things before getting it right.&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({&amp;lt;SALE_DT = {'&amp;gt;= $(=AddMonths(MakeDate(Year(Now()), Month(Now()), '01'), -12))},&lt;BR /&gt;SALE_DT = {'&amp;lt;= $(MakeDate(Year(Now()), Month(Now()), '01'))}&amp;gt;} SALES_AMT)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 23:42:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax-sum-sales-between-dates/m-p/150632#M28615</guid>
      <dc:creator />
      <dc:date>2009-07-29T23:42:24Z</dc:date>
    </item>
  </channel>
</rss>

