<?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 on Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169312#M40151</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 just trying this :&lt;/P&gt;&lt;P&gt;if(GetSelectedCount(ID_DATE) OR GetSelectedCount(ID_WEEK) OR GetSelectedCount(ID_MONTH) OR GetSelectedCount(ID_YEAR),&lt;BR /&gt;count({&amp;lt;ID_DATE={"$(=date(max(ID_DATE)))"}&amp;gt;} ID_Bug),&lt;BR /&gt;count({&amp;lt;ID_DATE={"$(=date(today()))"}&amp;gt;} ID_Bug))&lt;/P&gt;&lt;P&gt;Results are good but if the ID_WEEK '12' (from today to 27/03/2011), max(ID_DATE) = 27/03/2011. I'ts normal but i want to have today's results.&lt;/P&gt;&lt;P&gt;So, i modify this expression by adding :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;if(date(max(ID_DATE)) &amp;gt;= date(today()), count({&amp;lt;ID_DATE={"$(=date(today()))"}&amp;gt;} ID_Bug)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;count({&amp;lt;ID_DATE={"$(=date(max(ID_DATE)))"}&amp;gt;} ID_Bug)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help (and for the "today()/now()" difference) &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Mar 2011 09:35:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-21T09:35:45Z</dc:date>
    <item>
      <title>Set Analysis on Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169309#M40148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;First of all, i'm sorry for the bad english ... I'm a french student.&lt;/P&gt;&lt;P&gt;So, this is my set analysis expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=count({&amp;lt;ID_DATE={"$(=date(max(ID_DATE)))"}-{"&amp;gt;$(=date(now()))"}&amp;gt;} ID_Bug)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;ID_DATE is a date (format : "DD/MM/YYYY") between 01/01/2008 and 31/12/2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 tables :&lt;/P&gt;&lt;P&gt;- Bug(ID_Bug, Status, ...)&lt;/P&gt;&lt;P&gt;- Calendar(ID_DATE, ID_WEEK, ID_MONTH, ID_YEAR)&lt;/P&gt;&lt;P&gt;- BugActive(ID_Bug, ID_DATE, Status)&lt;/P&gt;&lt;P&gt;BugActive contains dates (ID_DATE) for each ID_Bugbetween the date of his creation and the date of his resolution. And his status per day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With my expression, i would like to get number of ID_Bug by respecting :&lt;/P&gt;&lt;P&gt;- if an ID_DATE is selected, i want to get number of ID_Bug of this day,&lt;/P&gt;&lt;P&gt;- if an ID_WEEK is selected, i want to get number of ID_BUG of the last day of this week,&lt;/P&gt;&lt;P&gt;- if an ID_MONTH is selected, i want to get number of ID_BUG of the last day of this month,&lt;/P&gt;&lt;P&gt;- the same for ID_YEAR&lt;/P&gt;&lt;P&gt;- if an ID_WEEK and an ID_MONTH are selected, i want to get number of ID_Bug of the last day of the week of the month selected.&lt;/P&gt;&lt;P&gt;But, if nothing is selected, i want to get number of ID_Bug of today&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you understood me as much as possible.&lt;/P&gt;&lt;P&gt;Thank you for help !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 15:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169309#M40148</guid>
      <dc:creator />
      <dc:date>2011-03-18T15:01:01Z</dc:date>
    </item>
    <item>
      <title>Set Analysis on Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169310#M40149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem with your English &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;I didn't test it, so you'll have to try and adjust:&lt;BR /&gt;if(GetSelectedCount(ID_DATE) OR GetSelectedCount(ID_WEEK) OR GetSelectedCount(ID_MONTH) OR GetSelectedCount(ID_YEAR)),&lt;BR /&gt;count({&amp;lt;ID_DATE={"$(=date(max(ID_DATE)))"}&amp;gt;} ID_Bug),&lt;BR /&gt;count({&amp;lt;ID_DATE={"$(=date(today()))"}&amp;gt;} ID_Bug))&lt;/P&gt;&lt;P&gt;And, not matter if this is good or not - never use now() in front end expressions. It will take all CPU it can... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 15:59:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169310#M40149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-18T15:59:19Z</dc:date>
    </item>
    <item>
      <title>Set Analysis on Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169311#M40150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Michael Solomovich wrote: And, not matter if this is good or not - never use now() in front end expressions. It will take all CPU it can... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Technically, now() only polls the operating systems once per second. So if, say, you're just displaying the current time, it will use very little CPU. But if, say, you have a hundred million rows of timestamped data, and you want to ignore the last 24 hours of that data, this:&lt;/P&gt;&lt;P&gt;sum(if(Timestamp&amp;lt;now()-1,Value))&lt;/P&gt;&lt;P&gt;Is going to lock your CPU at 100%, because it will try to recalculate every second, and this expression is very likely to take more than one second to recalculate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 22:09:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169311#M40150</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-03-18T22:09:39Z</dc:date>
    </item>
    <item>
      <title>Set Analysis on Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169312#M40151</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 just trying this :&lt;/P&gt;&lt;P&gt;if(GetSelectedCount(ID_DATE) OR GetSelectedCount(ID_WEEK) OR GetSelectedCount(ID_MONTH) OR GetSelectedCount(ID_YEAR),&lt;BR /&gt;count({&amp;lt;ID_DATE={"$(=date(max(ID_DATE)))"}&amp;gt;} ID_Bug),&lt;BR /&gt;count({&amp;lt;ID_DATE={"$(=date(today()))"}&amp;gt;} ID_Bug))&lt;/P&gt;&lt;P&gt;Results are good but if the ID_WEEK '12' (from today to 27/03/2011), max(ID_DATE) = 27/03/2011. I'ts normal but i want to have today's results.&lt;/P&gt;&lt;P&gt;So, i modify this expression by adding :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;if(date(max(ID_DATE)) &amp;gt;= date(today()), count({&amp;lt;ID_DATE={"$(=date(today()))"}&amp;gt;} ID_Bug)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;count({&amp;lt;ID_DATE={"$(=date(max(ID_DATE)))"}&amp;gt;} ID_Bug)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help (and for the "today()/now()" difference) &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 09:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-Date/m-p/169312#M40151</guid>
      <dc:creator />
      <dc:date>2011-03-21T09:35:45Z</dc:date>
    </item>
  </channel>
</rss>

