<?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 issue with following formula in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177223#M44919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it doesn't make any sense to me... might be just working "by accident" - I advise to test it very well, with different date combinations, to exclude an accidental result...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2011 17:24:37 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2011-03-23T17:24:37Z</dc:date>
    <item>
      <title>sum issue with following formula in expression</title>
      <link>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177220#M44916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I recently created a straight table against a database filtering on date parameters v_StartDate and v_EndDate&lt;/P&gt;&lt;P&gt;When I select v_StartDate as 11/28/2010 and I select v_EndDate as 01/01/2011, I only obtain data from 11/28/2010 to 12/31/2010.&lt;/P&gt;&lt;P&gt;My formula in the expression is as follows:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; DtTransDate = {'&amp;gt;=$(=Date(v_StartDate))&amp;lt;=$(=Date(v_EndDate))'} &amp;gt;}Retail)&lt;/P&gt;&lt;P&gt;I would assume based on the formula above, that I will obtain all data from 11/28/2010 to 1/1/2011. Yet, this formula filters out 1/1/2011.&lt;/P&gt;&lt;P&gt;Only when I change it to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; DtTransDate = {'&amp;gt;=$(=Date(v_StartDate))&amp;lt;=$(=Date(v_EndDate+1))'} &amp;gt;}Retail) does this data include 1/1/2011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested the Value in v_EndDate and it is 40544(which is 01/01/2011).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would this happen? Is my formula incorrect?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 16:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177220#M44916</guid>
      <dc:creator />
      <dc:date>2011-03-23T16:15:12Z</dc:date>
    </item>
    <item>
      <title>sum issue with following formula in expression</title>
      <link>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177221#M44917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just as a blind guess - check if your field DtTransDate is not represented as a timestamp (the easiest way is to Preview your data in the Table Viewer). If it's a time stamp with any decimal part other than zero, your comparison to the result of a Date() function will not include the last date.&lt;/P&gt;&lt;P&gt;Also, it's quite strange that your Set Analsys search condition works fine with single quotes - I though we need double quotes for search.&lt;/P&gt;&lt;P&gt;Another idea is to create a list box for DtTransDate and to try to enter the search criteria manually, and see what happens.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 16:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177221#M44917</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-03-23T16:33:18Z</dc:date>
    </item>
    <item>
      <title>sum issue with following formula in expression</title>
      <link>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177222#M44918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you for your response. I previewed the data and DtTransDate shows as YYYY-MM-DD with no time stamp.&lt;/P&gt;&lt;P&gt;I also found that If I modify the formula to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({&amp;lt; DtTransDate = {'&amp;gt;=$(=Date(vStartDate))&amp;lt;=(=Date(vEndDate))'} &amp;gt;}TicketTotal_c)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it works and includes 1/1/2011. The original had two dollar signs :&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; DtTransDate = {'&amp;gt;=$(=Date(vStartDate))&amp;lt;=$(=Date(vEndDate))'} &amp;gt;}TicketTotal_c)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; Would you know why this change makes a difference? &lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you know why this change makes a difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 16:41:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177222#M44918</guid>
      <dc:creator />
      <dc:date>2011-03-23T16:41:00Z</dc:date>
    </item>
    <item>
      <title>sum issue with following formula in expression</title>
      <link>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177223#M44919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it doesn't make any sense to me... might be just working "by accident" - I advise to test it very well, with different date combinations, to exclude an accidental result...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 17:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-issue-with-following-formula-in-expression/m-p/177223#M44919</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-03-23T17:24:37Z</dc:date>
    </item>
  </channel>
</rss>

