<?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 if time difference &amp;lt;= 30 'mm' in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-if-time-difference-lt-30-mm/m-p/437684#M163193</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 am calculating the time difference using this expression &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INTERVAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InitialEncounterWithDoctorDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ArrivalDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'mm') &lt;/SPAN&gt;. Calculation works great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the next column, I need an expression that will count if the time difference is &amp;lt;=30 and another column to count when it is &amp;gt;30. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried this expression, but it doesn't work... &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;COUNT&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INTERVAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InitialEncounterWithDoctorDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ArrivalDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;=30, 'mm'),(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VisitGUID&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Mar 2013 16:32:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-13T16:32:45Z</dc:date>
    <item>
      <title>Count if time difference &lt;= 30 'mm'</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-time-difference-lt-30-mm/m-p/437684#M163193</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 am calculating the time difference using this expression &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INTERVAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InitialEncounterWithDoctorDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ArrivalDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'mm') &lt;/SPAN&gt;. Calculation works great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the next column, I need an expression that will count if the time difference is &amp;lt;=30 and another column to count when it is &amp;gt;30. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried this expression, but it doesn't work... &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;COUNT&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INTERVAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InitialEncounterWithDoctorDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ArrivalDateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;=30, 'mm'),(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VisitGUID&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 16:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-time-difference-lt-30-mm/m-p/437684#M163193</guid>
      <dc:creator />
      <dc:date>2013-03-13T16:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count if time difference &lt;= 30 'mm'</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-time-difference-lt-30-mm/m-p/437685#M163194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the count always show 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;INTERVAL&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;InitialEncounterWithDoctorDateTime&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;ArrivalDateTime&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt; &amp;lt;=30, 'mm'),'-30','+30')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 16:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-time-difference-lt-30-mm/m-p/437685#M163194</guid>
      <dc:creator>eddysanchez</dc:creator>
      <dc:date>2013-03-13T16:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count if time difference &lt;= 30 'mm'</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-time-difference-lt-30-mm/m-p/437686#M163195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your syntax is &lt;/P&gt;&lt;P&gt;COUNT(&lt;/P&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;INTERVAL(InitialEncounterWithDoctorDateTime-ArrivalDateTime, 'mm')&amp;lt;=30,&lt;/P&gt;&lt;P&gt;VisitGUID&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can also do &lt;/P&gt;&lt;P&gt;count(if (ArrivalToProv &amp;lt;=30, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 01:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-time-difference-lt-30-mm/m-p/437686#M163195</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-03-14T01:26:57Z</dc:date>
    </item>
  </channel>
</rss>

