<?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: Count of records Greater than or Equal to today in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175783#M889946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny!&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This is what I used to get it working:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;TStartDate={"$(='&amp;gt;=' &amp;amp; Date(Today(), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date(Today()+14, 'M/D/YYYY'))"}&amp;gt;} TCode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt; What's your take on when to know the difference between using a format like this (used in other places): &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;TStartDate={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;"&amp;gt;=$(=Date(Today()))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Compared to :&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;TStartDate={"$(='&amp;gt;=' &amp;amp; Date(Today(), 'M/D/YYYY'))"} &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Not knowing the syntax difference between where to put the '$', whether to use quotes around the &amp;gt;=, whether you need to specify a date format, etc., has been a difficult learning point for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Aug 2016 19:12:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-08-26T19:12:55Z</dc:date>
    <item>
      <title>Count of records Greater than or Equal to today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175780#M889940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to put together a bar graph to show the number of trainees we have starting on any given day.&amp;nbsp; The graph currently works when using an IF statement but I cannot get it working using set analysis.&amp;nbsp; I inevitably want to make it so the graph shows a rolling time frame of today --&amp;gt; today + 14 and ignore any of the filters plus make it read only.&amp;nbsp; I tried detaching, but of course it comes right back after a reload (what's the point of being able to detach if it's just going to reattach).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TStartDate is stored as a date field, so I shouldn't have to do a '=Num(Today())'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what currently works:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14721809137612713" jivemacro_uid="_14721809137612713" modifiedtitle="true"&gt;
&lt;P&gt;=If(TStartDate &amp;lt;= today()+14 and TStartDate &amp;gt;= today(), count(TCode))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I feel should work but does not:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14721814118652649 jive_text_macro" jivemacro_uid="_14721814118652649" modifiedtitle="true"&gt;
&lt;P&gt;=Count({&amp;lt;TStartDate={"&amp;gt;=$(=Date(Today()))"},TStartDate={"&amp;lt;=$(=Date(Today()+14))"}&amp;gt;} TCode)&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;=Count({1&amp;lt;TStartDate={"&amp;gt;=$(=Date(Today()))"},TStartDate={"&amp;lt;=$(=Date(Today()+14))"}&amp;gt;} TCode)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp; I feel like I've tried every variation of what has worked on past fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&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/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175780#M889940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count of records Greater than or Equal to today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175781#M889943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="func"&gt;Try this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="func"&gt;Count({&amp;lt;TStartDate={&lt;SPAN class="string"&gt;"&amp;gt;=$(=Date(Today())) &lt;/SPAN&gt;&lt;SPAN class="string"&gt;&amp;lt;=$(=Date(Today()+14))"&lt;/SPAN&gt;}&amp;gt;} TCode)&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 05:20:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175781#M889943</guid>
      <dc:creator>varshavig12</dc:creator>
      <dc:date>2016-08-26T05:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Count of records Greater than or Equal to today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175782#M889945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your date format here? Can you share the script that you use to create TStartDate in the script?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4394"&gt;Dates in Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having said that, I would try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;TStartDate={"$(=&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;'&amp;gt;=' &amp;amp; Date(Today(), '&lt;SPAN style="color: #ff0000;"&gt;DateFieldFormatHere&lt;/SPAN&gt;') &amp;amp; '&amp;lt;=' &amp;amp; Date(Today()+14&lt;STRONG style="font-size: 10pt;"&gt;, '&lt;SPAN style="color: #ff0000;"&gt;DateFieldFormatHere&lt;/SPAN&gt;'&lt;/STRONG&gt;))"}&amp;gt;} TCode)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here &lt;STRONG style="color: #ff0000; font-size: 10pt;"&gt;DateFieldFormatHere &lt;/STRONG&gt;is a placeholder and needs to be replaced with the TStartDate field's format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 09:21:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175782#M889945</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-26T09:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count of records Greater than or Equal to today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175783#M889946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny!&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This is what I used to get it working:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;TStartDate={"$(='&amp;gt;=' &amp;amp; Date(Today(), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date(Today()+14, 'M/D/YYYY'))"}&amp;gt;} TCode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt; What's your take on when to know the difference between using a format like this (used in other places): &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;TStartDate={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;"&amp;gt;=$(=Date(Today()))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Compared to :&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;TStartDate={"$(='&amp;gt;=' &amp;amp; Date(Today(), 'M/D/YYYY'))"} &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Not knowing the syntax difference between where to put the '$', whether to use quotes around the &amp;gt;=, whether you need to specify a date format, etc., has been a difficult learning point for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 19:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175783#M889946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-26T19:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count of records Greater than or Equal to today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175784#M889947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like to use my expression this way&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;STRONG&gt;=Count({1&amp;lt;TStartDate=&lt;SPAN style="color: #ff0000;"&gt;{"$(='&amp;gt;=' &amp;amp; Date(Today(), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date(Today()+14, 'M/D/YYYY'))"}&lt;/SPAN&gt;&amp;gt;} TCode)&lt;/STRONG&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;&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;But this should give you the same result&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;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=Count({1&amp;lt;TStartDate=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{"&amp;gt;=$(=Date(Today(), 'M/D/YYYY'))&amp;lt;=$(=Date(Today()+14, 'M/D/YYYY'))"}&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&amp;gt;} TCode)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I use it the way I do is because, I can test my set analysis input in a text box, by simply picking everthing between the dollar sign expansion and put it into a text box object -&amp;gt; &lt;STRONG style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;='&amp;gt;=' &amp;amp; Date(Today(), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date(Today()+14, 'M/D/YYYY').&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The above should give you the range of date you want and in the date format you have for TStartDate. If one of the two isn't right, your set analysis will most likely won't work for you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to answer when to use the date format vs. when not to use is based on the fact how you have created your field in the script. If you provided a format while creating a date or you did not even use a date format, but QlikView was intelligent enough to understand it as a date then you will need the date format (unless it matches the date format within the environmental variable). I will give few example below to explain what I just meant. Let say your environmental variable is set like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET DateFormat='DD/MM/YYYY';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TStartDate as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TStartDate) as Date1,&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(TSTartDate, 'M/D/YYYY') as Date2&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the above scenario, you would need to specify the date format for Date and Date2, but you would not need to specify the date format for Date1 because Date1 is not assigned DD/MM/YYYY and the same would be true on the front end when you will do Date(Today()) which will be assigned DD/MM/YYYY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 13:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-records-Greater-than-or-Equal-to-today/m-p/1175784#M889947</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-27T13:26:52Z</dc:date>
    </item>
  </channel>
</rss>

