<?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: Set Analysis Exclusion Problem - Finding previous Tier in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Exclusion-Problem-Finding-previous-Tier/m-p/472581#M559458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi set analysis won't work in this case&lt;/P&gt;&lt;P&gt;because what happen the exlude function is exluding all tier types that are in tier 0&lt;/P&gt;&lt;P&gt;in your example T4,T2,T4/PB/BAon&amp;nbsp;&amp;nbsp; they are exluded for all payers&lt;/P&gt;&lt;P&gt;this is the reason when you look at all payers , it doesn't work and if you look only on payer 1 it working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would think the best way if possible is doing it in the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 May 2013 08:59:40 GMT</pubDate>
    <dc:creator>lironbaram</dc:creator>
    <dc:date>2013-05-19T08:59:40Z</dc:date>
    <item>
      <title>Set Analysis Exclusion Problem - Finding previous Tier</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Exclusion-Problem-Finding-previous-Tier/m-p/472580#M559457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an interesting set analysis exclusion problem with which I am struggling right now. Can someone please help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem Statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DateId = 0 always gives the current tier for a given payer. For instance: In the attached prototype,&amp;nbsp; Payer 1 has T4/PB/PA as the current tier. In this problem, I would like to find out what the previous tier was for each payer. In determining the previous tier, following conditions must be met:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. DateId must not be 0 and the search should be conducted in increasing order of DateIds (1, 2, 3 etc.)&lt;/P&gt;&lt;P&gt;2. Previous Tier must not be the same as current tier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression that I am using to get the Previous Tier is:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;FirstSortedValue({&amp;lt;Tier = E({&amp;lt;DateId={'0'}&amp;gt;})&amp;gt;} Distinct Tier, DateId)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the attached Qlikview document for a prototype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the prototype -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's Working ?&lt;/P&gt;&lt;P&gt;Payer 2 has current tier T4 in dateid 0. Also, the same tier exists in dateid 1. Therefore, the logic for previous tier ignores T4 and jumps to T4/NPG/SE, which is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whats' not working ?&lt;/P&gt;&lt;P&gt;Payer1 has current tier T4/PB/PA in dateid 0. For DateId =1 , tier is T4, which should have been picked up as the previous tier. However, it jumps to DateId = 2 and shows T3 as the previous tier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;As soon as Payer 1 is selected, the previous tier is correctly picked up as T4. I am unable to understand why this happens.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Puneet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 May 2013 06:09:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Exclusion-Problem-Finding-previous-Tier/m-p/472580#M559457</guid>
      <dc:creator />
      <dc:date>2013-05-19T06:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Exclusion Problem - Finding previous Tier</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Exclusion-Problem-Finding-previous-Tier/m-p/472581#M559458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi set analysis won't work in this case&lt;/P&gt;&lt;P&gt;because what happen the exlude function is exluding all tier types that are in tier 0&lt;/P&gt;&lt;P&gt;in your example T4,T2,T4/PB/BAon&amp;nbsp;&amp;nbsp; they are exluded for all payers&lt;/P&gt;&lt;P&gt;this is the reason when you look at all payers , it doesn't work and if you look only on payer 1 it working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would think the best way if possible is doing it in the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 May 2013 08:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Exclusion-Problem-Finding-previous-Tier/m-p/472581#M559458</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2013-05-19T08:59:40Z</dc:date>
    </item>
  </channel>
</rss>

