<?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 Wrong value return when adding date in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31254#M5198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue when adding date into my set analysis expression, it just returns 0 but it is the wrong value. The expressions as below and i also attached the qvw file. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Would a kind and enlightened please advise on my error, many thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TYPE = {FL}, DIM_DATE = {"&amp;gt; =$(= date ('2018/01/01' ) )&amp;nbsp; &amp;lt; =$(=date ( '2018/01/31' ))"} &amp;gt;}Total_Number)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TYPE = {FL}, DIM_DATE = {"&amp;gt; =$(= date ('2018/01/01' ) )&amp;nbsp; &amp;lt; =$(=date ( '2018/01/31' ))"} &amp;gt;}Net_Number)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2018 04:32:10 GMT</pubDate>
    <dc:creator>EQ</dc:creator>
    <dc:date>2018-06-15T04:32:10Z</dc:date>
    <item>
      <title>Wrong value return when adding date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31254#M5198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue when adding date into my set analysis expression, it just returns 0 but it is the wrong value. The expressions as below and i also attached the qvw file. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Would a kind and enlightened please advise on my error, many thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TYPE = {FL}, DIM_DATE = {"&amp;gt; =$(= date ('2018/01/01' ) )&amp;nbsp; &amp;lt; =$(=date ( '2018/01/31' ))"} &amp;gt;}Total_Number)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TYPE = {FL}, DIM_DATE = {"&amp;gt; =$(= date ('2018/01/01' ) )&amp;nbsp; &amp;lt; =$(=date ( '2018/01/31' ))"} &amp;gt;}Net_Number)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 04:32:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31254#M5198</guid>
      <dc:creator>EQ</dc:creator>
      <dc:date>2018-06-15T04:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong value return when adding date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31255#M5199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if this is what you are expecting? Check attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slight modification to your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, Num#(DimDtID) AS DateID ;&lt;/P&gt;&lt;P&gt;LOAD DIM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIM_DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#(DIM_DATE,'YYYY/M/DD h:mm:ss') AS DimDtID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Net_Number,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total_Number,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;S&gt;&lt;/S&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Document_TB01);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = Num(Date('2018/1/1'));&lt;/P&gt;&lt;P&gt;LET vMaxDate = Num(Date('2018/1/31'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expr used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum({&amp;lt;TYPE = {FL}, DateID = {"&amp;gt;=$(vMinDate)&amp;lt;=$(vMaxDate)"} &amp;gt;}Total_Number)&lt;/P&gt;&lt;P&gt;= sum({&amp;lt;TYPE = {FL}, DateID = {"&amp;gt;=$(vMinDate)&amp;lt;=$(vMaxDate)"} &amp;gt;}Net_Number)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 15:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31255#M5199</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-06-15T15:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong value return when adding date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31256#M5200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always a good practice to use Integer values while filtering and comparing data in set analysis. That is how I do. It varies with individuals though. So i converted the dates to integers to filter on DateID, which also helps us to keep set analysis syntax simpler. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 15:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31256#M5200</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-06-15T15:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong value return when adding date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31257#M5201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also try this without changes to the script AS YOUR DIM_DATE seems to be saved in a timestamp format and not a date format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;TYPE = {FL}, DIM_DATE = {"&amp;gt;=$(=TimeStamp ('2018/01/01'))&amp;lt;=$(=TimeStamp('2018/01/31'))"} &amp;gt;}Total_Number)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 16:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31257#M5201</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-15T16:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong value return when adding date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31258#M5202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwarath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A very good suggestion, integer is better to do the filter, thank you very much for your help!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2018 00:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31258#M5202</guid>
      <dc:creator>EQ</dc:creator>
      <dc:date>2018-06-16T00:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong value return when adding date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31259#M5203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, change it to TimeStamp() and verything works fine, thanks a lot! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2018 00:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31259#M5203</guid>
      <dc:creator>EQ</dc:creator>
      <dc:date>2018-06-16T00:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong value return when adding date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31260#M5204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great. Close the thread marking correct/helpful responses accordingly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2018 05:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-value-return-when-adding-date-in-set-analysis/m-p/31260#M5204</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-06-16T05:02:06Z</dc:date>
    </item>
  </channel>
</rss>

