<?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 highlight a row based on existence of another row in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026262#M465409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I am sure there must be ways to do this on the front end, but I thought it would make more sense to do in the script since it makes the calculation so much easier. Do you not want to touch your data model at this time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2016 09:06:50 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-03-22T09:06:50Z</dc:date>
    <item>
      <title>how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026255#M465402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got the following table&lt;/P&gt;&lt;P&gt;row_id,date_id,event_id,event_type, customer,value&lt;/P&gt;&lt;P&gt;1,1,1,t,a,10&lt;/P&gt;&lt;P&gt;2,2,2,t,a,15&lt;/P&gt;&lt;P&gt;3,2,2,t,a,20&lt;/P&gt;&lt;P&gt;4,2,7,t,b,17&lt;/P&gt;&lt;P&gt;5,3,100,v,a&lt;/P&gt;&lt;P&gt;6,3,200,v,a&lt;/P&gt;&lt;P&gt;7,5,3,t,b,30&lt;/P&gt;&lt;P&gt;8,6,3,t,b,50&lt;/P&gt;&lt;P&gt;9,7,4,t,a,100&lt;/P&gt;&lt;P&gt;10,8,4,t,a,12&lt;/P&gt;&lt;P&gt;11,9,5,t,a,18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am showing that data in a straight table.&lt;/P&gt;&lt;P&gt;How can i&lt;/P&gt;&lt;P&gt;1) highlight&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; rows &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;where event_type = 't' and for the same customer could be found a row with event_type='v'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;In the sample i would highlight rows 1,2,3,9,10,11&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;2) highlight rows with the same event_id where event_type = 't' and next (in order of date_id) event for the same customer is an event where event_type = 'v'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;In the sample i would highlight &lt;SPAN style="font-size: 13.3333px;"&gt;rows 2,3&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Is that possible without script calculations?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 13:46:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026255#M465402</guid>
      <dc:creator>pkrouglov</dc:creator>
      <dc:date>2016-03-18T13:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026256#M465403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For 1) why won't you also highlight 5 and 6? those are customer a as well? Is there a reason those two are excluded?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 14:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026256#M465403</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-18T14:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026257#M465404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;5 and 6 are excluded because their event_type = 'v'.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 14:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026257#M465404</guid>
      <dc:creator>pkrouglov</dc:creator>
      <dc:date>2016-03-18T14:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026258#M465405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the expression for color I used for your 1st condition&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Count({&amp;lt;customer = p({&amp;lt;event_type = {'t'}&amp;gt;})*p({&amp;lt;event_type = {'v'}&amp;gt;}), event_type = {'t'}&amp;gt;}row_id) &amp;gt; 0, LightCyan())&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118603_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you elaborate a little on your second requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 15:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026258#M465405</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-18T15:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026259#M465406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny. That worked.&lt;/P&gt;&lt;P&gt;The following is regarding second requirement.&lt;/P&gt;&lt;P&gt;In my data model I have combined two data sets. In the sample they are identified by event_type.&lt;/P&gt;&lt;P&gt;'t' - is a kind of data change log or transaction log (here I'd better rename customer to object_id)&lt;/P&gt;&lt;P&gt;'v' - is a data validation status. Transaction and validation processes are asynchronous, where transaction sets a "validation required" flag. There will be n..0 records of validation status for each object_id (customer) in the transaction log. &lt;/P&gt;&lt;P&gt;The identifier for the validation status is object_id+rule_id (event_id). Validation status contains records only for failed rules, so when validation gets succeeded, then the related record is removed from the validation status data set.&lt;/P&gt;&lt;P&gt;Validation status date_id indicates when last time a particular rule failure was detected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'd like to highlight transactions that are followed by validation failure. This would show "bad" transactions.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;IMG alt="Capture1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118751_Capture1.PNG" style="height: auto;" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 08:18:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026259#M465406</guid>
      <dc:creator>pkrouglov</dc:creator>
      <dc:date>2016-03-21T08:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026260#M465407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your second requirement, I was able to create a flag in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&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 * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;row_id,date_id,event_id,event_type, customer,value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,1,1,t,a,10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,2,2,t,a,15&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3,2,2,t,a,20&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4,2,7,t,b,17&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5,3,100,v,a&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6,3,200,v,a&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;7,5,3,t,b,30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;8,6,3,t,b,50&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9,7,4,t,a,100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;10,8,4,t,a,12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;11,9,5,t,a,18&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD date_id - 1 as date_id,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; customer,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 1 as Flag&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;Where event_type = 'v';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118868_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/118869_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 19:50:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026260#M465407</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-21T19:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026261#M465408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny,&lt;/P&gt;&lt;P&gt;It confirms that I will have to rethink my data model.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 08:15:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026261#M465408</guid>
      <dc:creator>pkrouglov</dc:creator>
      <dc:date>2016-03-22T08:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026262#M465409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I am sure there must be ways to do this on the front end, but I thought it would make more sense to do in the script since it makes the calculation so much easier. Do you not want to touch your data model at this time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 09:06:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026262#M465409</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-22T09:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026263#M465410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is OK to change the model. In this case it would not be even a big change.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 09:51:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026263#M465410</guid>
      <dc:creator>pkrouglov</dc:creator>
      <dc:date>2016-03-22T09:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to highlight a row based on existence of another row</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026264#M465411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed &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, 22 Mar 2016 10:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-highlight-a-row-based-on-existence-of-another-row/m-p/1026264#M465411</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-22T10:46:11Z</dc:date>
    </item>
  </channel>
</rss>

