<?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: if logic calculation help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-logic-calculation-help/m-p/62081#M773917</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assuming that you need this logic to be implemented in the script. Using peek within if can help you to achieve this in the script. Please find attached application for your reference.&lt;/P&gt;&lt;P&gt;Make sure to order your data before using Peek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, below are the expression I used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shifted To :&lt;/P&gt;&lt;P&gt;If(SNO&amp;lt;=Peek(SNO,1,'Test') and SNO&amp;lt;&amp;gt;24,'NONE',if([Employee ID]= Peek([Employee ID],-1) and DOMAIN&amp;lt;&amp;gt;Peek(DOMAIN,-1),DOMAIN,'')) as [Shifted To]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Shifted From&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;if(Len(If(SNO&amp;lt;=Peek(SNO,1,'Test') and SNO&amp;lt;&amp;gt;24,'NONE',if([Employee ID]= Peek([Employee ID],-1) and DOMAIN&amp;lt;&amp;gt;Peek(DOMAIN,-1),DOMAIN,'')))&amp;lt;&amp;gt;0,Peek(DOMAIN,-1),'') as [Shifted From]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Akshaya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS - If you find this response as Correct/Helpful, mark it as Correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 May 2018 18:35:12 GMT</pubDate>
    <dc:creator>adityaakshaya</dc:creator>
    <dc:date>2018-05-21T18:35:12Z</dc:date>
    <item>
      <title>if logic calculation help</title>
      <link>https://community.qlik.com/t5/QlikView/if-logic-calculation-help/m-p/62080#M773916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Can any one please help me to calculate the shifted From and Shifted To columns by Employee ID,SNO and DOMAIN columns in Qlik.&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The Excel calculations For&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shifted To is =IF(AND(B3&amp;lt;=B2,B2&amp;lt;&amp;gt;24),"NONE",IF(AND(A2=A1,C2&amp;lt;&amp;gt;C1),C2,""))&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shifted From is =IF(E2&amp;lt;&amp;gt;"",C1,"")&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-logic-calculation-help/m-p/62080#M773916</guid>
      <dc:creator>mahitham</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: if logic calculation help</title>
      <link>https://community.qlik.com/t5/QlikView/if-logic-calculation-help/m-p/62081#M773917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assuming that you need this logic to be implemented in the script. Using peek within if can help you to achieve this in the script. Please find attached application for your reference.&lt;/P&gt;&lt;P&gt;Make sure to order your data before using Peek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, below are the expression I used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shifted To :&lt;/P&gt;&lt;P&gt;If(SNO&amp;lt;=Peek(SNO,1,'Test') and SNO&amp;lt;&amp;gt;24,'NONE',if([Employee ID]= Peek([Employee ID],-1) and DOMAIN&amp;lt;&amp;gt;Peek(DOMAIN,-1),DOMAIN,'')) as [Shifted To]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Shifted From&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;if(Len(If(SNO&amp;lt;=Peek(SNO,1,'Test') and SNO&amp;lt;&amp;gt;24,'NONE',if([Employee ID]= Peek([Employee ID],-1) and DOMAIN&amp;lt;&amp;gt;Peek(DOMAIN,-1),DOMAIN,'')))&amp;lt;&amp;gt;0,Peek(DOMAIN,-1),'') as [Shifted From]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Akshaya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS - If you find this response as Correct/Helpful, mark it as Correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2018 18:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-logic-calculation-help/m-p/62081#M773917</guid>
      <dc:creator>adityaakshaya</dc:creator>
      <dc:date>2018-05-21T18:35:12Z</dc:date>
    </item>
  </channel>
</rss>

