<?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 error in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187057#M50885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone tell me what is wrong with this expression?&lt;/P&gt;&lt;P&gt;=Sum(If(Timestamp(StartTime)&amp;gt;'6/2/2010 1:00:00 AM')Round((Timestamp(EndTime)-Timestamp(Start_Interval))*24,0.01))&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jan 2011 22:07:08 GMT</pubDate>
    <dc:creator>dhborchardt</dc:creator>
    <dc:date>2011-01-26T22:07:08Z</dc:date>
    <item>
      <title>error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187057#M50885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone tell me what is wrong with this expression?&lt;/P&gt;&lt;P&gt;=Sum(If(Timestamp(StartTime)&amp;gt;'6/2/2010 1:00:00 AM')Round((Timestamp(EndTime)-Timestamp(Start_Interval))*24,0.01))&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 22:07:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187057#M50885</guid>
      <dc:creator>dhborchardt</dc:creator>
      <dc:date>2011-01-26T22:07:08Z</dc:date>
    </item>
    <item>
      <title>error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187058#M50886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Sum(If(Timestamp(StartTime)&amp;gt;'6/2/2010 1:00:00 AM',Round(Timestamp(EndTime)-Timestamp(Start_Interval))*24,0.01))&lt;/P&gt;&lt;P&gt;Not sure what your requirement is but try above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 22:28:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187058#M50886</guid>
      <dc:creator />
      <dc:date>2011-01-26T22:28:55Z</dc:date>
    </item>
    <item>
      <title>error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187059#M50887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see lots wrong with it, but it's hard to fix it without being able to test or knowing what you wanted it to do. Maybe this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(if(StartTime&amp;gt;makedate(2010,2,6)+1/24,round((EndTime-StartInterval)*24,0.01)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 01:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187059#M50887</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-27T01:24:45Z</dc:date>
    </item>
    <item>
      <title>error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187060#M50888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, That works.&lt;/P&gt;&lt;P&gt;Sorry I did not give more detail. When I first started explainig I started to write a novel. I figured it was just a simple syntax problem and I would just confuse the situation.&lt;/P&gt;&lt;P&gt;Here is what I am trying to do: I have a table with three columns, PatientID, StartTime, EndTime. StartTime is the time the patient was admitted, EndTime was the time discharged. I need to find out how many hours patients were in the hospital within each day (Start_Interval - End_Interval). This expression was the beginning of that expression. Here is were it gets fun. I want to see the patient hours for 6/2/2010 12:01 AM to 6/3/2010. Patient A was in the hospital from noon 6/1 until noon 6/2. This is a total of 24 hours for the patient but only 12 hours between the start and stop interval (Patient Day). Patient B was admitted 6/2 at noon and discharged 6/2 at 5:00 PM. This is a total of 5 hours and also counts toward that patient day.&lt;/P&gt;&lt;P&gt;I need to test:&lt;/P&gt;&lt;P&gt;Each visit's begining time to make sure it is &amp;lt;= to End_interval&lt;/P&gt;&lt;P&gt;Each visit's ending time to make sure it is &amp;gt;= Start_Interval&lt;/P&gt;&lt;P&gt;If the visit was within the start end intervals total the whole time but if only part of it is within then count only those hours&lt;/P&gt;&lt;P&gt;Sum the hours found within the the interval&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 16:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/error-in-expression/m-p/187060#M50888</guid>
      <dc:creator>dhborchardt</dc:creator>
      <dc:date>2011-01-27T16:42:16Z</dc:date>
    </item>
  </channel>
</rss>

