<?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 Loop Through Computation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1890796#M1217270</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have the following feature to be implemented in QlikView. I want to know if this is possible or not. Please help.&lt;/P&gt;
&lt;P&gt;I have a table containing the following data. I have to display a computed value in the textbox which will go through all the selected rows in the table and do the logical operation.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nigharikkha_0-1644392224497.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71929iB23170468987F8B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nigharikkha_0-1644392224497.png" alt="nigharikkha_0-1644392224497.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PseudoCode:&lt;/P&gt;
&lt;P&gt;TTF = 0&lt;BR /&gt;For each row&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If (Fail = 0)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TTF = TTF +(StopTS - StartTS)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If (Fail = 1)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TTF = TTF +(FailTS - StartTS)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Break the loop if Fail = 1&lt;BR /&gt;}&lt;BR /&gt;Display TTF in Text Box&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me if this is something possible in QlikView and how.&lt;/P&gt;
&lt;P&gt;What logic can be used?&lt;/P&gt;
&lt;P&gt;Whether the logic can be implemented in the Textbox itself or should we use the Module?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 09 Feb 2022 07:37:53 GMT</pubDate>
    <dc:creator>nigharikkha</dc:creator>
    <dc:date>2022-02-09T07:37:53Z</dc:date>
    <item>
      <title>Loop Through Computation</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1890796#M1217270</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have the following feature to be implemented in QlikView. I want to know if this is possible or not. Please help.&lt;/P&gt;
&lt;P&gt;I have a table containing the following data. I have to display a computed value in the textbox which will go through all the selected rows in the table and do the logical operation.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nigharikkha_0-1644392224497.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71929iB23170468987F8B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nigharikkha_0-1644392224497.png" alt="nigharikkha_0-1644392224497.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PseudoCode:&lt;/P&gt;
&lt;P&gt;TTF = 0&lt;BR /&gt;For each row&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If (Fail = 0)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TTF = TTF +(StopTS - StartTS)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If (Fail = 1)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TTF = TTF +(FailTS - StartTS)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Break the loop if Fail = 1&lt;BR /&gt;}&lt;BR /&gt;Display TTF in Text Box&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me if this is something possible in QlikView and how.&lt;/P&gt;
&lt;P&gt;What logic can be used?&lt;/P&gt;
&lt;P&gt;Whether the logic can be implemented in the Textbox itself or should we use the Module?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 07:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1890796#M1217270</guid>
      <dc:creator>nigharikkha</dc:creator>
      <dc:date>2022-02-09T07:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Through Computation</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1890817#M1217271</link>
      <description>&lt;P&gt;Real loop-calculations aren't possible within the UI. But quite often there are other ways to reach the same results. In your case it might be something like:&lt;/P&gt;
&lt;P&gt;sum(aggr(if(Fail, Fail - Start, End - Start), Label, Fail))&lt;/P&gt;
&lt;P&gt;In many scenarios it's preferable to transfer such logic at least partly within the script by flagging the cases and calculating there the duration and within the UI it's just enough to use a sum() or count() maybe with an optional&amp;nbsp; set analysis to get the wanted results.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 08:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1890817#M1217271</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-02-09T08:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Through Computation</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1890831#M1217272</link>
      <description>&lt;P&gt;Thanks for the clarification, Marcus.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 08:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1890831#M1217272</guid>
      <dc:creator>nigharikkha</dc:creator>
      <dc:date>2022-02-09T08:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Through Computation</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1891240#M1217299</link>
      <description>&lt;P&gt;Is this question related to&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Calculate-all-row-values/td-p/1890740" target="_blank" rel="noopener"&gt;&amp;nbsp;https://community.qlik.com/t5/QlikView-App-Dev/Calculate-all-row-values/td-p/1890740&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;
&lt;P&gt;Your example shows a table sorted by Fail. As you only want to include the first occurrence of Fail=1, the result would depend on the interactive sort order of this table which does not impact the TextBox calculation per se.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 20:22:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Through-Computation/m-p/1891240#M1217299</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-02-09T20:22:23Z</dc:date>
    </item>
  </channel>
</rss>

