<?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: Need help with Logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184293#M383364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason you moved the Previous(Previous( check after Previous( check?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Sep 2016 20:50:14 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-09-27T20:50:14Z</dc:date>
    <item>
      <title>Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184287#M383358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help with a script logic.&lt;/P&gt;&lt;P&gt;Scenario is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have some IDs, Questions and Responses of the Question in a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But there are some of the Questions that need to skipped based on the answer of their previous Question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample data and the logic to be incorporated and the output after logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I am able to explain my case, if not let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 15:53:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184287#M383358</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-09-27T15:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184288#M383359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QUESTION, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESPONSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TestData.xls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is Sheet1$);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(ID = Previous(Previous(ID)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Previous(Previous(QUESTION)) = 'Ques-A' and Previous(Previous(RESPONSE)) = 'AHF', Null(), RESPONSE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(ID = Previous(ID),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If((Previous(QUESTION) = 'Ques-A' and Previous(RESPONSE) = 'AHF') or (Previous(QUESTION) = 'Ques-X' and Previous(RESPONSE) = 'No'), Null(), RESPONSE), RESPONSE)) as Outcome&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By ID, QUESTION;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 16:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184288#M383359</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-27T16:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184289#M383360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time. So far it looks good with the sample data.&lt;/P&gt;&lt;P&gt;I'll apply it in real scenario and see If I am getting the expected resulted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again Thanks. I'll update you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 16:18:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184289#M383360</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-09-27T16:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184290#M383361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds good. Just make sure to fix the order by statement for QUESTION as I believe that it worked out well for the sample, but you might need to fix that for original Questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 16:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184290#M383361</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-27T16:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184291#M383362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, totally agree with you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 16:25:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184291#M383362</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-09-27T16:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184292#M383363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a few more combination in real data and I modified the sample data accordingly.&lt;/P&gt;&lt;P&gt;Everything else is working fine except the where Previous to Previous case exists.&lt;/P&gt;&lt;P&gt;Like in updated data ID=68, Ques-C should be null. but its not picking it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have modified the existing condition a bit.&lt;/P&gt;&lt;P&gt;I did try to dig it but couldn't find where I am making mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 20:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184292#M383363</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-09-27T20:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184293#M383364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason you moved the Previous(Previous( check after Previous( check?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 20:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184293#M383364</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-27T20:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184294#M383365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I move that up then 1st condition doesn't work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 20:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184294#M383365</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-09-27T20:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184295#M383366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QUESTION, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESPONSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[TestData2.xls]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is Sheet1$);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QUESTION, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESPONSE,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(IsNull(Temp2) or IsNull(Temp), Null(), Temp) as Outcome;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(ID = Previous(Previous(ID)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Previous(Previous(QUESTION)) = 'Ques-A' and Previous(Previous(RESPONSE)) = 'AHF', Null(), RESPONSE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(ID = Previous(ID),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If((Previous(QUESTION) = 'Ques-A' and Previous(RESPONSE) = 'AHF') or (Previous(QUESTION) = 'Ques-X' and Previous(RESPONSE) = 'No'), Null(), RESPONSE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; RESPONSE)) as Temp2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(ID = Previous(ID), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If((Previous(QUESTION) = 'Ques-A' and Previous(RESPONSE) = 'AHF') or (Previous(QUESTION) = 'Ques-X' and Previous(RESPONSE) = 'No'), Null(), RESPONSE), RESPONSE) as Temp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By ID, QUESTION;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2016 02:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184295#M383366</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-28T02:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184296#M383367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sunny Thanks a lot....it worked great &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;Cheers!!!!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2016 15:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184296#M383367</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-09-28T15:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184297#M383368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2016 17:25:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Logic/m-p/1184297#M383368</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-28T17:25:19Z</dc:date>
    </item>
  </channel>
</rss>

