<?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 Count Values on certain days between certain times in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-Values-on-certain-days-between-certain-times/m-p/1789315#M61664</link>
    <description>&lt;P&gt;Can someone please enlighten me as to where I am going wrong......&lt;/P&gt;&lt;P&gt;As a business we are looking to understand activity between our opening hours on specific days.&lt;/P&gt;&lt;P&gt;I am trying to say if the week day falls on a certain day between 9 - 5 count the id's.&lt;/P&gt;&lt;P&gt;count( {&amp;lt;WeekDay = {3,6}&amp;gt;} IF([calltime]&amp;gt;='09:00:00'AND calltime&amp;lt;='17:00:00', ID ))&lt;/P&gt;&lt;P&gt;In the data load the field is actually called "Call Date Time (CommsCalls)" and is in&amp;nbsp; DD/MM/YYYY HH:MM:SS format so i converted it using the below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;time("Call Date Time (CommsCalls)") as calltime&lt;/P&gt;&lt;P&gt;Any ideas where I am going wrong?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Mon, 08 Mar 2021 18:36:58 GMT</pubDate>
    <dc:creator>Zara</dc:creator>
    <dc:date>2021-03-08T18:36:58Z</dc:date>
    <item>
      <title>Count Values on certain days between certain times</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Values-on-certain-days-between-certain-times/m-p/1789315#M61664</link>
      <description>&lt;P&gt;Can someone please enlighten me as to where I am going wrong......&lt;/P&gt;&lt;P&gt;As a business we are looking to understand activity between our opening hours on specific days.&lt;/P&gt;&lt;P&gt;I am trying to say if the week day falls on a certain day between 9 - 5 count the id's.&lt;/P&gt;&lt;P&gt;count( {&amp;lt;WeekDay = {3,6}&amp;gt;} IF([calltime]&amp;gt;='09:00:00'AND calltime&amp;lt;='17:00:00', ID ))&lt;/P&gt;&lt;P&gt;In the data load the field is actually called "Call Date Time (CommsCalls)" and is in&amp;nbsp; DD/MM/YYYY HH:MM:SS format so i converted it using the below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;time("Call Date Time (CommsCalls)") as calltime&lt;/P&gt;&lt;P&gt;Any ideas where I am going wrong?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 18:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Values-on-certain-days-between-certain-times/m-p/1789315#M61664</guid>
      <dc:creator>Zara</dc:creator>
      <dc:date>2021-03-08T18:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count Values on certain days between certain times</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Values-on-certain-days-between-certain-times/m-p/1789319#M61665</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/90682"&gt;@Zara&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you share a sample data and the expected output ?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 18:59:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Values-on-certain-days-between-certain-times/m-p/1789319#M61665</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-03-08T18:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Count Values on certain days between certain times</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Values-on-certain-days-between-certain-times/m-p/1789440#M61682</link>
      <description>&lt;P&gt;In load script, you could just make a bool-field for every call to say if the call was in working hours:&lt;/P&gt;&lt;P&gt;if(weekday(Date(Floor(Timestamp#([Call Date Time (CommsCalls)], 'DD/MM/YYYY hh:mm:ss')), 'YYYY/MM/DD')) &amp;lt; 6&lt;BR /&gt;and&lt;BR /&gt;(Time(Timestamp#([Call Date Time (CommsCalls)], 'DD/MM/YYYY hh:mm:ss'), 'hh') &amp;gt; 9 and Time(Timestamp#([Call Date Time (CommsCalls)], 'DD/MM/YYYY hh:mm:ss'), 'hh') &amp;lt; 17), 1, 0) as boolInWorkingHours&lt;/P&gt;&lt;P&gt;and then use your SA-String (replace the IF with a secund SA filter on the bool field) to count the IDs for the&amp;nbsp; calls&amp;nbsp; on specific weekdays (I suppose you have a master calendar in place?)&lt;/P&gt;&lt;P&gt;Qlik is somewhat "sensible" when it is not fully aware of the data type (you expect the IF clause to interpret a string as a number... my scripts fail when the datataype is more clear and I forget to explicitly cast it to num#() or text#()...&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 07:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Values-on-certain-days-between-certain-times/m-p/1789440#M61682</guid>
      <dc:creator>Stevie_Go</dc:creator>
      <dc:date>2021-03-09T07:35:07Z</dc:date>
    </item>
  </channel>
</rss>

