<?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 Sum Sales between Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-Sales-between-Dates/m-p/1440976#M808984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm really struggling to sum the sales between two dates and was wondering if anyone could help and explain what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I've got 5 fields, Customer, Start Date, End Date, CalendarMonthAndYear, Sales&lt;/P&gt;&lt;P&gt;*Start Date/EndDates will vary for each customer*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When adding the below calculated dimension, the result is as expected - Yes and No where it should be...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Audit Sales End] &amp;gt; CalendarMonthAndYear and CalendarMonthAndYear &amp;gt;= [Audit Sales Start],'Yes','No')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I replicated this as an expression and changed the 'yes' to sum(sales) &amp;amp; removed 'no', but it's not providing the result I'm after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've since tried to adjust this as it appears that if isn't correct, and used something like this instead but it's still not correct &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(({&amp;lt;$CalendarMonthAndYear ={"&amp;gt;=$([Start Date])&amp;lt;=$([End Date])"}&amp;gt;}, Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated, and it would be good to understand why what I have tried isn't working...&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;Ben &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Sum Sales between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Sales-between-Dates/m-p/1440976#M808984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm really struggling to sum the sales between two dates and was wondering if anyone could help and explain what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I've got 5 fields, Customer, Start Date, End Date, CalendarMonthAndYear, Sales&lt;/P&gt;&lt;P&gt;*Start Date/EndDates will vary for each customer*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When adding the below calculated dimension, the result is as expected - Yes and No where it should be...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Audit Sales End] &amp;gt; CalendarMonthAndYear and CalendarMonthAndYear &amp;gt;= [Audit Sales Start],'Yes','No')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I replicated this as an expression and changed the 'yes' to sum(sales) &amp;amp; removed 'no', but it's not providing the result I'm after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've since tried to adjust this as it appears that if isn't correct, and used something like this instead but it's still not correct &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(({&amp;lt;$CalendarMonthAndYear ={"&amp;gt;=$([Start Date])&amp;lt;=$([End Date])"}&amp;gt;}, Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated, and it would be good to understand why what I have tried isn't working...&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;Ben &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Sales-between-Dates/m-p/1440976#M808984</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Sales between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Sales-between-Dates/m-p/1440977#M808985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your CalendarMonthAndYear field format i mean what format is this field in it should match with your Start date and End date fields?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 17:11:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Sales-between-Dates/m-p/1440977#M808985</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-10-12T17:11:00Z</dc:date>
    </item>
  </channel>
</rss>

