<?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: Error in script !! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820795#M1040107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyDowntime_StartTime and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyDowntime_EndTime are fields, and you are attempting a row-by-row comparison, it won't work, because set analysis does not work like that. The set expression is evaluated once, not row by row.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have two options - &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use a Sum(If(...)) expression. This will do the comparison row by row, but will perform poorly on large data sets&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a flag field in your load script&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyStartTime &amp;gt;= KeyDowntime_StartTime And &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyStartTime &lt;/SPAN&gt;&amp;lt;=&amp;nbsp; KeyDowntime_EndTime, 1, 0) As DTFlag,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and use the flag in the set expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Dec 2014 08:46:37 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-12-12T08:46:37Z</dc:date>
    <item>
      <title>Error in script !!</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820790#M1040098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I want to sum the duration of time as per following script but it is showing me&amp;nbsp; 00:00:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Event= {'Server_DOWN'} , KeyStartTime= {"&amp;gt;= $(=KeyDowntime_StartTime)"}, KeyEndTime= {"&amp;lt;= $(=KeyDowntime_EndTime)"}&amp;gt;} Duration)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's wrong in this ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 07:24:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820790#M1040098</guid>
      <dc:creator>nikhilgarg</dc:creator>
      <dc:date>2014-12-12T07:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in script !!</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820791#M1040100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum({&amp;lt;Event= {'Server_DOWN'} , KeyStartTime= {'&amp;gt;= $(=KeyDowntime_StartTime)'}, KeyEndTime= {'&amp;lt;= $(=KeyDowntime_EndTime)'}&amp;gt;} Duration)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this expression .. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 07:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820791#M1040100</guid>
      <dc:creator />
      <dc:date>2014-12-12T07:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error in script !!</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820792#M1040102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I tried this but it doesnot work out.&lt;/P&gt;&lt;P&gt;It still showing 00:00:00&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 07:46:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820792#M1040102</guid>
      <dc:creator>nikhilgarg</dc:creator>
      <dc:date>2014-12-12T07:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error in script !!</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820793#M1040104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=Sum({&amp;lt;Event= {'Server_DOWN'} , KeyStartTime= {"&amp;gt;= $(=KeyDowntime_StartTime) &amp;lt;=&amp;nbsp; $(=KeyDowntime_EndTime)"}&amp;gt;} Duration)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 07:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820793#M1040104</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2014-12-12T07:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error in script !!</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820794#M1040106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CHECK ENCLOSED FILE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 08:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820794#M1040106</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-12-12T08:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error in script !!</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820795#M1040107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyDowntime_StartTime and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyDowntime_EndTime are fields, and you are attempting a row-by-row comparison, it won't work, because set analysis does not work like that. The set expression is evaluated once, not row by row.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have two options - &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use a Sum(If(...)) expression. This will do the comparison row by row, but will perform poorly on large data sets&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a flag field in your load script&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyStartTime &amp;gt;= KeyDowntime_StartTime And &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;KeyStartTime &lt;/SPAN&gt;&amp;lt;=&amp;nbsp; KeyDowntime_EndTime, 1, 0) As DTFlag,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and use the flag in the set expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 08:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/820795#M1040107</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-12-12T08:46:37Z</dc:date>
    </item>
  </channel>
</rss>

