<?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: How to omit a previous row from a table based off a string in the next row. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708667#M724064</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV95.PNG" style="width: 240px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35053i622FE0856007F79E/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV95.PNG" alt="commQV95.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jun 2020 19:56:54 GMT</pubDate>
    <dc:creator>Saravanan_Desingh</dc:creator>
    <dc:date>2020-06-05T19:56:54Z</dc:date>
    <item>
      <title>How to omit a previous row from a table based off a string in the next row.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708648#M724062</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I'm numbering rows in a table and I need to remove some rows before they are numbered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Example.PNG" style="width: 404px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35049i1F00AA57F25246F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Example.PNG" alt="Example.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the image, I need to remove 'Shot' and 'Aerial Duel Won' because the next event is a goal ,otherwise they are counted twice in the charts I need them for. There will be other events like them that would also need to be removed. So I think previous can be anything if the next or current = 'Goal' but I am a bit stuck figuring out how to &lt;STRONG&gt;not&lt;/STRONG&gt; include that previous event as the script is being loaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708648#M724062</guid>
      <dc:creator>AyCe1082</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to omit a previous row from a table based off a string in the next row.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708665#M724063</link>
      <description>&lt;P&gt;One solution is.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD RecNo() As RowID, * INLINE [
    ShotType
    Shot
    Shot
    Shot
    Shot
    Free Kick
    Shot
    Shot
    Shot
    Shot
    Shot
    Shot
    Shot
    Goal
    Free Kick
    Aerial Duel Won
    Goal
    Shot
];

tab2:
LOAD *, If(Peek(ShotType)='Goal','N','Y') As ShotFlag
Resident tab1
Order By RowID desc 
;

tab3:
NoConcatenate
LOAD *, RowNo() As ShotRank
Resident tab2
Where ShotFlag='Y'
Order By RowID
;

Drop Table tab1, tab2;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Jun 2020 19:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708665#M724063</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-06-05T19:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to omit a previous row from a table based off a string in the next row.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708667#M724064</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV95.PNG" style="width: 240px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35053i622FE0856007F79E/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV95.PNG" alt="commQV95.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 19:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708667#M724064</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-06-05T19:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to omit a previous row from a table based off a string in the next row.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708738#M724065</link>
      <description>&lt;P&gt;The data will be different every time as this is an ongoing automated process. I am not sure an inline will work here. Also it involves two different teams which is why I have two shotrank columns and they are the numerical order in which they occurred in the match so I presume the rows that have to be removed must happen before they are ranked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have used to create the table.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Shots:
LOAD *,
if(HomeAwayshots = '1',Sequence) as ShotRank,
if(HomeAwayshots = '2',Sequence) as ShotRank2;
LOAD
HomeAwayshots,
If(Previous(HomeAwayshots) = HomeAwayshots, Rangesum(1, peek('Sequence')), 1) as Sequence,
Player as ShotPlayer,     
Teamnameshots, 
Half as PeriodHalf,
Event_Time,
Event_EventName as ShotType

Resident Shotspre 
order by HomeAwayshots,Half, Event_Time asc
;

drop table Shotspre;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 11:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708738#M724065</guid>
      <dc:creator>AyCe1082</dc:creator>
      <dc:date>2020-06-06T11:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to omit a previous row from a table based off a string in the next row.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708835#M724066</link>
      <description>&lt;P&gt;I managed a solution using&amp;nbsp;&lt;SPAN&gt;saran7de's solution combined with what I was already using.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Solution.PNG" style="width: 302px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35103i40F84F9167163583/image-size/large?v=v2&amp;amp;px=999" role="button" title="Solution.PNG" alt="Solution.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The two ShotRank fields were retained while omitting the previous row to the Goals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Shotspre2:
LOAD
RecNo() As RowID,
HomeAwayshots,
Player as ShotPlayer,     
Teamnameshots, 
Half as PeriodHalf,
Event_Time,
Event_EventName as ShotType

Resident Shotspre 
order by HomeAwayshots,Half, Event_Time asc
;

drop table Shotspre;


Shotspre3:
LOAD *, If(Peek(ShotType)='Goal','N','Y') As ShotFlag
Resident Shotspre2
Order By RowID desc 
;

Shots:
LOAD *,
if(HomeAwayshots = '1',Sequence) as ShotRank,
if(HomeAwayshots = '2',Sequence) as ShotRank2;
LOAD *,
If(Previous(HomeAwayshots) = HomeAwayshots, Rangesum(1, peek('Sequence')), 1) as Sequence;
NoConcatenate
LOAD *, RowNo() As ShotRankpre
Resident Shotspre3
Where ShotFlag='Y'
Order By RowID
;

Drop fields ShotFlag, Sequence, ShotRankpre from Shots;
Drop Table Shotspre2, Shotspre3;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the assistance.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 15:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-omit-a-previous-row-from-a-table-based-off-a-string-in/m-p/1708835#M724066</guid>
      <dc:creator>AyCe1082</dc:creator>
      <dc:date>2020-06-07T15:40:23Z</dc:date>
    </item>
  </channel>
</rss>

