<?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: Previous Rule in loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817913#M1213176</link>
    <description>&lt;P&gt;&lt;STRONG&gt;"since the starting location is Consignment"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;what is the starting location you were referring to ?? is it based on Month??&lt;/P&gt;&lt;P&gt;how do you define starting location ??&lt;/P&gt;&lt;P&gt;what are you expecting for "Fly" (27.05.2021 to 31.05.2021)??&lt;/P&gt;&lt;P&gt;What are you expecting for "Fly" (13.06.2021 to 15.06.2021)??&lt;/P&gt;&lt;P&gt;What are you expecting for "Warehouse" ( 07.06.2021 to 11.06.2021)??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2021 12:46:51 GMT</pubDate>
    <dc:creator>sasikanth</dc:creator>
    <dc:date>2021-06-25T12:46:51Z</dc:date>
    <item>
      <title>Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817828#M1213166</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;i have following data set.&lt;/P&gt;&lt;P&gt;I would like to create a new field, called in the example below "&lt;STRONG&gt;IK|LocationRule&lt;/STRONG&gt;" that shows the value "Consignment" if the prevoius record is "Fly". Basically i want that IK|LocationRUle cannot be never Fly, if the starting location is "Consignment". Can be fly only if the starting location (26/05/2021) is different than "Consignment"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set this rule:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;IF(Location&amp;amp;Previous(Location)='FlyConsignment','Consignment',Location) as IK|LocationRule&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;The rule is working just for the first record (27/05/2021) but i would like to have also the other days as Consignment.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;How i can fix this? Any Idea?&lt;BR /&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Immagine 2021-06-25 111954.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57519i1B747E2D4E8094D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Immagine 2021-06-25 111954.png" alt="Immagine 2021-06-25 111954.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 09:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817828#M1213166</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2021-06-25T09:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817845#M1213169</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try below condition&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(isnull(Previous(Location)),Location, if(Previous(Location)='Fly','Consignment',if(Previous(Location)&amp;lt;&amp;gt;'Consignment','Fly',Location))) as&amp;nbsp;IK|LocationRule&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;above condition is based on below note&amp;nbsp;&lt;/P&gt;&lt;P&gt;*"IK|LocationRule"&amp;nbsp; that shows the value "Consignment" if the &lt;STRONG&gt;previous&amp;nbsp;record is "Fly"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 10:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817845#M1213169</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2021-06-25T10:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817858#M1213170</link>
      <description>&lt;P&gt;This is not working since the "Starting location" (26/05/2021) could be also "Warehouse" and in that case we need to stick with "Fly"&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 10:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817858#M1213170</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2021-06-25T10:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817899#M1213173</link>
      <description>&lt;P&gt;can you share sample data ??&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 11:48:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817899#M1213173</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2021-06-25T11:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817910#M1213175</link>
      <description>&lt;P&gt;Find attached the QVW- i expect to have in the IK|LocationRule , "Consignment" on the highlighted cell in RED, since the starting location is Consignment&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlikviewaf_0-1624623630667.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57552i475BE0FFF9D0846A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qlikviewaf_0-1624623630667.png" alt="qlikviewaf_0-1624623630667.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 12:21:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817910#M1213175</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2021-06-25T12:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817913#M1213176</link>
      <description>&lt;P&gt;&lt;STRONG&gt;"since the starting location is Consignment"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;what is the starting location you were referring to ?? is it based on Month??&lt;/P&gt;&lt;P&gt;how do you define starting location ??&lt;/P&gt;&lt;P&gt;what are you expecting for "Fly" (27.05.2021 to 31.05.2021)??&lt;/P&gt;&lt;P&gt;What are you expecting for "Fly" (13.06.2021 to 15.06.2021)??&lt;/P&gt;&lt;P&gt;What are you expecting for "Warehouse" ( 07.06.2021 to 11.06.2021)??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 12:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817913#M1213176</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2021-06-25T12:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817918#M1213179</link>
      <description>&lt;P&gt;Let me say it better: the requirement is to have "Fly" as value, only if the Previous location was not Consignment , but needs to be applied also for the following days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for the 27 May, since the 26 is Consignment (this is what i called starting location), the 27-31 cannot be Fly but needs to be Consignment&lt;/P&gt;&lt;P&gt;For 13.06 to 15.06, i expect to stick with Fly, since the previous location was Warehosue (11 June)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What are you expecting for "Warehouse" ( 07.06.2021 to 11.06.2021)?? Nothing, if it's warehouse needs to stick to warehouse&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 12:53:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817918#M1213179</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2021-06-25T12:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817953#M1213184</link>
      <description>&lt;P&gt;its clear now,&amp;nbsp;&lt;/P&gt;&lt;P&gt;use the below condition to achieve the desired results&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Location='Fly' and peek(IK|LocationRule)='Consignment','Consignment',Location) as IK|LocationRule&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 15:08:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817953#M1213184</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2021-06-25T15:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817957#M1213185</link>
      <description>&lt;P&gt;it works! can you explain logic behind that rule if you dont mind ?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 15:22:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817957#M1213185</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2021-06-25T15:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Rule in loop</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817963#M1213187</link>
      <description>&lt;P&gt;simple,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Location field it self is not sufficient to derive 'consignment' value for all 'Fly' rows,&amp;nbsp; peek function is used to retrieve previous value of a field which can be used in the same condition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;peek(IK|LocationRule&lt;STRONG&gt;) --&amp;gt; &lt;/STRONG&gt;returns previous value in&amp;nbsp;&lt;STRONG&gt;IK|LocationRule &lt;/STRONG&gt;field .&lt;/P&gt;&lt;P&gt;previous value in&amp;nbsp;&lt;STRONG&gt;IK|LocationRule &lt;/STRONG&gt;field for Location ='Fly' is '&lt;STRONG&gt;Consignment'&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 16:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Rule-in-loop/m-p/1817963#M1213187</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2021-06-25T16:19:24Z</dc:date>
    </item>
  </channel>
</rss>

