<?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 compare fields within column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458556#M794442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new in QlikView and I've got a Problem:&lt;/P&gt;&lt;P&gt;My data is about scheduled and is Time and there are some wrong data sets because of measruments. An example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 805px; height: 134px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Plan Time&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Is Time&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:03:30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:04:29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:05:40&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;09:30:26&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:10:00&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:12:35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:14:00&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:15:54&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to tag these wrong data sets and store them into a table for further treatment.&lt;/P&gt;&lt;P&gt;I load the data from a qvd which looks like above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my question:&lt;/P&gt;&lt;P&gt;How can I compare two fields within a column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>compare fields within column</title>
      <link>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458556#M794442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new in QlikView and I've got a Problem:&lt;/P&gt;&lt;P&gt;My data is about scheduled and is Time and there are some wrong data sets because of measruments. An example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 805px; height: 134px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Plan Time&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Is Time&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:03:30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:04:29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:05:40&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;09:30:26&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:10:00&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:12:35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28.05.2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:14:00&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05:15:54&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to tag these wrong data sets and store them into a table for further treatment.&lt;/P&gt;&lt;P&gt;I load the data from a qvd which looks like above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my question:&lt;/P&gt;&lt;P&gt;How can I compare two fields within a column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&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/compare-fields-within-column/m-p/1458556#M794442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields within column</title>
      <link>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458557#M794443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sonja, what kind of comparison are you searching?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dates are numbers internally (1=1 day; 0.5=12 hours) so you can do math operations with them:&lt;/P&gt;&lt;P&gt;LOAD [Is Time],&lt;/P&gt;&lt;P&gt;[Plan time],&lt;/P&gt;&lt;P&gt;[Is Time]-[Plan time] as Difference,&lt;/P&gt;&lt;P&gt;If([Is Time]&amp;gt;[Plan time], 'Late') as Status&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 10:20:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458557#M794443</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-01-04T10:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields within column</title>
      <link>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458558#M794444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to compare [Is Time] from the second row with&amp;nbsp; [Is Time] from the third row.&lt;/P&gt;&lt;P&gt;If [Is Time] from the second row is greater than [Is Time] from the third row, than I have a wrong data set, as in my example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 10:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458558#M794444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-04T10:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields within column</title>
      <link>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458559#M794445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is wrong within the above rows? What exactly are you comparing? Not sure if you are comparing Plan Time vs Is Time or if the comparison is within one of those rows to previous row? If it is comparing a particular row to it's previous row, you can use Peek() or Previous to do this&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3048"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:42:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458559#M794445</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T13:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields within column</title>
      <link>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458560#M794446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the &lt;A _jive_internal="true" data-containerid="2588" data-containertype="37" data-objectid="3048" data-objecttype="38" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/04/08/peek-vs-previous-when-to-use-each"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt; to do this kind of thing in the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458560#M794446</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-04T14:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: compare fields within column</title>
      <link>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458561#M794447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for delay, as Sunny said for inter-record comparisons you can use peek or previous doing a sorted load by Date and [Plan Time] descendent (to check if the one before has a higher time), ie:&lt;/P&gt;&lt;P&gt;LOAD Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Plan Time],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Is Time],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Peek(Date)=Date and &lt;SPAN style="font-size: 13.3333px;"&gt;[Is Time]&amp;lt;Peek(&lt;SPAN style="font-size: 13.3333px;"&gt;[Is Time]), 'wrong') as status&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Resident TableName&lt;/P&gt;&lt;P&gt;Order by Date, &lt;SPAN style="font-size: 13.3333px;"&gt;[Plan Time] desc;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 12:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-fields-within-column/m-p/1458561#M794447</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-01-05T12:51:46Z</dc:date>
    </item>
  </channel>
</rss>

