<?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 Re: Counting yesterday values in QV in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462443#M792116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once again, thank you Nicole!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the set analysis this morning without any luck. I'm still having "0' as a result, although this is not the right answer.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Could you give an advice on how to load the timestamp as a date in the script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Nic&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jan 2018 13:39:51 GMT</pubDate>
    <dc:creator>nicalbert</dc:creator>
    <dc:date>2018-01-11T13:39:51Z</dc:date>
    <item>
      <title>Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462439#M792112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on a simple dashboard and I'm having troubles trying to count the numbers of items that were created "yesterday". I'm presenting the overall count of items and need to display "yesterday's" count as well. It would give something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;492 items made in total&lt;/LI&gt;&lt;LI&gt;13 made yesterday&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you would imagine, "yesterday" needs to be a dynamic value based on today's date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try many ways, but they all end up with a zero value or an error in the expression. I'm using the following items:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ItemCreatedDate, format is YYYY-MM-DD&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ItemId&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Can anyone help me on that?&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;Nic&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/Counting-yesterday-values-in-QV/m-p/1462439#M792112</guid>
      <dc:creator>nicalbert</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462440#M792113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think something like this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;ItemCreatedDate = {'$(=date(today()-1))'}&amp;gt;} ItemId)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the above doesn't work, you may have a timestamp that you can't see attached to the ItemCreatedDate.&amp;nbsp; You can get rid of this timestamp in your load script by using floor().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 20:53:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462440#M792113</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2018-01-10T20:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462441#M792114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicole,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just tried it and it returns "0" as a value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You mentioned timestamp..&amp;nbsp; the actual field is formatted "YYYY-MM-DD hh:mm:ss", should I specify that in the expression? Is is better to get rid of the hh:mm:ss portion?&lt;/P&gt;&lt;P&gt;Nic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:05:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462441#M792114</guid>
      <dc:creator>nicalbert</dc:creator>
      <dc:date>2018-01-10T21:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462442#M792115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have timestamps, you could format it as just a date in the script, or you can use &amp;gt;= and &amp;lt; in your set analysis to say where it is between yesterday and today like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;ItemCreatedDate = {'&amp;gt;=$(=today()-1)&amp;lt;$(=today())'}&amp;gt;} ItemId)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;This will handle the timestamps in the calculation.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462442#M792115</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2018-01-10T22:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462443#M792116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once again, thank you Nicole!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the set analysis this morning without any luck. I'm still having "0' as a result, although this is not the right answer.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Could you give an advice on how to load the timestamp as a date in the script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Nic&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 13:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462443#M792116</guid>
      <dc:creator>nicalbert</dc:creator>
      <dc:date>2018-01-11T13:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462444#M792117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second one should definitely work (I've tested it with some sample data myself).&amp;nbsp; Can you upload an example file with your data?&amp;nbsp; It's hard to tell why it isn't working without seeing the document you're working from.&amp;nbsp; Here is a good document on uploading an example file to the community: &lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 16:22:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462444#M792117</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2018-01-11T16:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462445#M792118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition, attached is the file I used to test my expression.&amp;nbsp; Can you check in your file if QV is recognizing the field as a timestamp?&amp;nbsp; If it isn't, that's the problem, and you need to use timestamp#() in your load script in order to let QV know it is one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="189754" alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/189754_Capture.JPG" style="height: 497px; width: 620px;" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 16:29:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462445#M792118</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2018-01-11T16:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462446#M792119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just tried yours, which works. &lt;SPAN style="font-size: 13.3333px;"&gt;But my file won't work! I honestly don't get where this fails...&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I looked at the field and it is recognized as a timestamp by QV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is an example of the data that I use to work with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 19:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462446#M792119</guid>
      <dc:creator>nicalbert</dc:creator>
      <dc:date>2018-01-11T19:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462447#M792120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like we need a DayStart() in order for this to work with your data (your sample file attached with this change):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;ItemCreatedDate = {'&amp;gt;=$(=DayStart(today()-1))&amp;lt;$(=DayStart(today()))'}&amp;gt;} ItemID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 22:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462447#M792120</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2018-01-11T22:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Counting yesterday values in QV</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462448#M792121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YES!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the right one! Thank you so very much for you time. It's really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 14:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-yesterday-values-in-QV/m-p/1462448#M792121</guid>
      <dc:creator>nicalbert</dc:creator>
      <dc:date>2018-01-12T14:35:35Z</dc:date>
    </item>
  </channel>
</rss>

