<?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 Coding Experts needed in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17698#M607002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I am still new to Qlikview and I have a kind of complex problem, I need your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a start amount (net inventory) and smaller amounts (production of several weeks) in the same line of my data set.&lt;/P&gt;&lt;P&gt;I need to subtract the first week from the start amount, see if that is bigger than zero, and then proceed, with the next week(s).&lt;/P&gt;&lt;P&gt;As this is kind of hard to understand, I have picture displaying my problem and a corresponding sample data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help. I know this can only be solved with variables and loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/197596_Capture.PNG" style="width: 620px; height: 331px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Mar 2018 10:58:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-27T10:58:58Z</dc:date>
    <item>
      <title>Coding Experts needed</title>
      <link>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17698#M607002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I am still new to Qlikview and I have a kind of complex problem, I need your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a start amount (net inventory) and smaller amounts (production of several weeks) in the same line of my data set.&lt;/P&gt;&lt;P&gt;I need to subtract the first week from the start amount, see if that is bigger than zero, and then proceed, with the next week(s).&lt;/P&gt;&lt;P&gt;As this is kind of hard to understand, I have picture displaying my problem and a corresponding sample data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help. I know this can only be solved with variables and loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/197596_Capture.PNG" style="width: 620px; height: 331px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 10:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17698#M607002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-27T10:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Coding Experts needed</title>
      <link>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17699#M607003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nobody can help? &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I need some kind of an algorithm, I can write in a pseudo code, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take [FieldStart] and subtract [Field0]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Check if [FieldStart] - [Field0&amp;gt;] &amp;gt; 0&amp;nbsp;&amp;nbsp; If yes,&amp;nbsp;&amp;nbsp; Let vNewAmount = [FieldA] - [Field0&amp;gt;] and Let vCounter = 1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Check if $(vNewAmount) - [Field-1] &amp;gt; 0, If yes,&amp;nbsp;&amp;nbsp; Let vNewAmount&amp;nbsp; = $(vNewAmount) - [Field-1] and Let vCounter = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3) continue until&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4) Stop if $(vNewAmount) - [Field-X] &amp;lt;= 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5) Final result: $(vCounter) * 7 +&amp;nbsp; (($(vNewAmount) - 0 ) / [Field-X] ) * 7&amp;nbsp; as [Revenue Days]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I really don't know how to write that down in a code in Qlik script. I especially have no idea how I get my algorithm to pick different data fields from a data row during the iteration to subtract the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate if someone can help me and makes me more knowledgeable for the future because I already found out I improve by every problem a lot.&lt;/P&gt;&lt;P&gt;Thanks a lot for anyone who has a guess. In the post before I have QVW with a simplified problem structure, please note that in my real world problem the data periods are about 52.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 06:17:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17699#M607003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-28T06:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Coding Experts needed</title>
      <link>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17700#M607005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure that I have understood your task completely and your data-example isn't really helpful but I think I would use interrecord-functions like &lt;A href="https://community.qlik.com/docs/DOC-9314"&gt;Peek() or Previous() ?&lt;/A&gt; within a normal table-structure by transforming the data per &lt;A href="https://community.qlik.com/qlik-blogpost/3628"&gt;The Crosstable Load&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With these functions you could check the records against eachother and calculate your needed values and/or creating some kind of flags. The important point is just to sort your resident-table properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 09:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17700#M607005</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-03-28T09:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Coding Experts needed</title>
      <link>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17701#M607006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your tip was very valuable to me because it made me think a complete different approach and finally I solved it.&lt;/P&gt;&lt;P&gt;I created a cross table and then some accumulation and ordering and it works very fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;PRE_WIP:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; KeyNr,LastName,NetInventory, Period0, Period1, Period2 , Period3, Period4, Period5&lt;BR /&gt; 1,Braun,95, 20, 45, 25, 30, 5, 20&lt;BR /&gt; 2,Schulz,200, 34,120,3, 30, 100, 16&lt;BR /&gt; 3,Meyer,100,25,2,10,20, 5, 10&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; Temp:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;CrossTable&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,2)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KeyNr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LastName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NetInventory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)*-1, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; , &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period3&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period5&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; PRE_WIP;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; PRE_WIP;&lt;BR /&gt; &lt;BR /&gt; Temp2:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; *,&lt;BR /&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;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&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: #800000; font-size: 8pt;"&gt;KeyNr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KeyNr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AmountCumulated&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AmountCumulated&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&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;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=1,0,&lt;BR /&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: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AmountCumulated&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;lt; 0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KeyNr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KeyNr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 7, &lt;BR /&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: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AmountCumulated&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;gt;0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Days&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) = 7, 0 - (((0 - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AmountCumulated&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))/&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)*-7),0))) &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Days&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Temp;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Temp &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 12:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coding-Experts-needed/m-p/17701#M607006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-28T12:53:52Z</dc:date>
    </item>
  </channel>
</rss>

