<?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: Changing Fields Based on Previous Values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988690#M81711</link>
    <description>&lt;P&gt;Again thanks for the advise, will be using peek a lot more going forward!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 14:27:33 GMT</pubDate>
    <dc:creator>hermanitor</dc:creator>
    <dc:date>2022-10-04T14:27:33Z</dc:date>
    <item>
      <title>Changing Fields Based on Previous Values</title>
      <link>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988565#M81696</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Am trying to change the field based on a condition to the previous entry....(I can do the first one, but not the second and thirds ones....!).&lt;BR /&gt;Table Below&lt;BR /&gt;EmpID, Date, Shift&lt;BR /&gt;3,01/10/22,A&lt;BR /&gt;3,02/10/22,/&lt;BR /&gt;3,03/10/22,B&lt;BR /&gt;3,04/10/22,/&lt;BR /&gt;3,05/10/22,/&lt;BR /&gt;3,06/10/22,/&lt;/P&gt;
&lt;P&gt;I can using the previous/peek command change the first '/'.&amp;nbsp; But I can't use this when I have repeated /.&lt;BR /&gt;&lt;EM&gt;if (Shift = '/',Peek(Shift),Shift) as Shift2,&lt;/EM&gt;&lt;BR /&gt;I have more than A's and B's in the list, but the '/' is my issue.&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Basically I want to change the '/' to the previous shift and then count based on the revised shift field.&lt;BR /&gt;&lt;BR /&gt;Am I explaining myself?&amp;nbsp; If not, please contact.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 11:11:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988565#M81696</guid>
      <dc:creator>hermanitor</dc:creator>
      <dc:date>2022-10-04T11:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Fields Based on Previous Values</title>
      <link>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988631#M81707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/94119"&gt;@hermanitor&lt;/a&gt;&amp;nbsp;, please try this, using peek function&lt;/P&gt;
&lt;P&gt;Aux:&lt;BR /&gt;Load * INLINE [&lt;BR /&gt;EmpID, Date, Shift&lt;BR /&gt;3,01/10/22,A&lt;BR /&gt;3,02/10/22,/&lt;BR /&gt;3,03/10/22,B&lt;BR /&gt;3,04/10/22,/&lt;BR /&gt;3,05/10/22,/&lt;BR /&gt;3,06/10/22,/&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;EmpID, &lt;BR /&gt;Date, &lt;BR /&gt;Shift,&lt;BR /&gt;if(Shift = '/', peek(Shift_New), Shift) as Shift_New&lt;BR /&gt;Resident Aux;&lt;BR /&gt;drop table Aux;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 13:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988631#M81707</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2022-10-04T13:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Fields Based on Previous Values</title>
      <link>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988687#M81709</link>
      <description>&lt;P&gt;Hi Fabian,&lt;BR /&gt;Perfect.&amp;nbsp; Thanks for your support....AM curious why this works using shift2 twice in the syntax, but am guessing this is just how Qlik works!&lt;BR /&gt;I think I may have a solution to my issue!&lt;BR /&gt;So you are aware, I was looking at this to try and solve my issue, but I think I can now use this as my work around....&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987213#M81581" target="_blank"&gt;https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987213#M81581&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 14:21:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988687#M81709</guid>
      <dc:creator>hermanitor</dc:creator>
      <dc:date>2022-10-04T14:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Fields Based on Previous Values</title>
      <link>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988689#M81710</link>
      <description>&lt;P&gt;Hi again, that's the main difference between peek and previous, peek can get the value from a recently calculated field in the same load statement.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 14:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988689#M81710</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2022-10-04T14:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Fields Based on Previous Values</title>
      <link>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988690#M81711</link>
      <description>&lt;P&gt;Again thanks for the advise, will be using peek a lot more going forward!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 14:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Changing-Fields-Based-on-Previous-Values/m-p/1988690#M81711</guid>
      <dc:creator>hermanitor</dc:creator>
      <dc:date>2022-10-04T14:27:33Z</dc:date>
    </item>
  </channel>
</rss>

