<?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: Break a condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891509#M1217312</link>
    <description>&lt;P&gt;It was not working as expected&lt;BR /&gt;Thank you for helping out&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 12:43:44 GMT</pubDate>
    <dc:creator>Athira_K</dc:creator>
    <dc:date>2022-02-10T12:43:44Z</dc:date>
    <item>
      <title>Break a condition</title>
      <link>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891471#M1217309</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I take data from excel which has a column named 'A' which is boolean(has 0,0,0,0,1,1,1,1......)&lt;BR /&gt;and 'Fail,Start,Stop' column with some integers&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Athira_K_0-1644496906413.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72032i7EE30C99DA3F9E8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Athira_K_0-1644496906413.png" alt="Athira_K_0-1644496906413.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now,I want to calculate the sum of integers, till the first boolean true value(1st true should be included) as shown in the image&lt;BR /&gt;How can I implement this in qlikview?&lt;BR /&gt;&lt;BR /&gt;Note:I tried using &lt;BR /&gt;i.Sum which gives the total sum of all rows&lt;BR /&gt;ii.Tried using Valueloop but break is not there&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 12:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891471#M1217309</guid>
      <dc:creator>Athira_K</dc:creator>
      <dc:date>2022-02-10T12:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Break a condition</title>
      <link>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891500#M1217311</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try using Rangesum&lt;/P&gt;
&lt;P&gt;=if(Below(A)=1,RangeSum(Above(TOTAL Sum( B),0,RowNo(TOTAL))))&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 12:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891500#M1217311</guid>
      <dc:creator>pooja_prabhu_n</dc:creator>
      <dc:date>2022-02-10T12:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Break a condition</title>
      <link>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891509#M1217312</link>
      <description>&lt;P&gt;It was not working as expected&lt;BR /&gt;Thank you for helping out&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 12:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891509#M1217312</guid>
      <dc:creator>Athira_K</dc:creator>
      <dc:date>2022-02-10T12:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Break a condition</title>
      <link>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891516#M1217314</link>
      <description>&lt;P&gt;I don't think that it could with these information be calculated within the UI because you would at least need another information which true-record is the first one. This might be done within the script with recno(). But even with this it won't be easy to calculate it. Further I assume that your real case is more complex and that there are far more records and other fields associated.&lt;/P&gt;
&lt;P&gt;Therefore I think it would be better to calculate it within the script respectively to flag the records appropriate. The last means to create a new boolean field - with interrecord-functions within an ordered resident-load. This may look like:&lt;/P&gt;
&lt;P&gt;load &lt;BR /&gt;Key,&lt;BR /&gt;if(Key &amp;lt;&amp;gt; previous(Key), 1, if(A = 1 and peek('C') = 1, 0, if(A = 0 and peek('C') = 1, 1, 0))) as C&lt;BR /&gt;resident Source order by Key, RecNoSource;&lt;/P&gt;
&lt;P&gt;The aim of it to flag all starting 0 records + the first 1 record with 1 and the other with 0 and this new flag-field could be then used as set analysis condition or you just multiply your sum(B) * C. The check-logic with the interrecord-functions may need some adjustment to match your requirements and you need also ensure that the records are loaded within the wanted order.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 13:13:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Break-a-condition/m-p/1891516#M1217314</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-02-10T13:13:08Z</dc:date>
    </item>
  </channel>
</rss>

