<?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 Calculated field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141583#M21230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the two most recent readings, - I can't think of an elegant solution that would allow doing it in one load... AS a work around, you could do it in two steps:&lt;/P&gt;&lt;P&gt;1. Load all readings sorted by Reader and Date descenting and assign numbers to each reading - something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;load&lt;BR /&gt; Reader,&lt;BR /&gt; Date,&lt;BR /&gt; Reading,&lt;BR /&gt; if(Peek(Reader) &amp;lt;&amp;gt; Reader, 0, previous(ReadingNumber)) as ReadingNumber,&lt;BR /&gt; if(Peek(Reader) &amp;lt;&amp;gt; Reader, Reading, Reading - previous(Reading)) as ReadingDifference&lt;BR /&gt;resident&lt;BR /&gt; Readings&lt;BR /&gt;Order By&lt;BR /&gt; Reader, Date DESC&lt;BR /&gt;;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, as a second step, reload from this table only selecting ReadingNumber &amp;lt;=2&lt;/P&gt;&lt;P&gt;Between peek() and previous(), this should work. I always forget which one works better in what situation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2009 19:03:12 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2009-04-16T19:03:12Z</dc:date>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141582#M21229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running a report on water meter readings, below is the result of one meter, showing the date the meter was read, together with the reading.&lt;/P&gt;&lt;P&gt;Firstly in the load statement how can I only select the two most recent readings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 136pt; border-collapse: collapse;" width="180"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 89pt; mso-width-source: userset; mso-width-alt: 4315; mso-outline-parent: collapsed;" width="118" /&gt;&lt;COL style="width: 47pt; mso-width-source: userset; mso-width-alt: 2267; mso-outline-parent: collapsed;" width="62" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="width: 89pt; height: 12.75pt; background-color: #ebebeb; border: gainsboro 0.5pt solid;" width="118"&gt;&lt;STRONG&gt;Reading Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro 0.5pt solid; border-left: gainsboro; width: 47pt; border-bottom: gainsboro 0.5pt solid; background-color: #ebebeb;" width="62"&gt;&lt;STRONG&gt;Reading&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl24" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: white;" num="39160"&gt;19/03/2007&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: white;"&gt;2499&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl26" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: whitesmoke;" num="39259"&gt;26/06/2007&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: whitesmoke;"&gt;2574&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl24" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: white;" num="39345"&gt;20/09/2007&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: white;"&gt;2655&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl26" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: whitesmoke;" num="39428"&gt;12/12/2007&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: whitesmoke;"&gt;2722&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl24" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: white;" num="39520"&gt;13/03/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: white;"&gt;2797&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl26" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: whitesmoke;" num="39584"&gt;16/05/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: whitesmoke;"&gt;2874&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl24" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: white;" num="39584"&gt;16/05/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: white;"&gt;2874&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl26" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: whitesmoke;" num="39612"&gt;13/06/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: whitesmoke;"&gt;2899&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl24" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: white;" num="39647"&gt;18/07/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: white;"&gt;2929&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl26" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: whitesmoke;" num="39647"&gt;18/07/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: whitesmoke;"&gt;2929&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl24" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: white;" num="39710"&gt;19/09/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: white;"&gt;2985&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl26" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: whitesmoke;" num="39794"&gt;12/12/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: whitesmoke;"&gt;3053&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl24" height="17" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro 0.5pt solid; border-bottom: gainsboro 0.5pt solid; height: 12.75pt; background-color: white;" num="39885"&gt;13/03/2009&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right: gainsboro 0.5pt solid; border-top: gainsboro; border-left: gainsboro; border-bottom: gainsboro 0.5pt solid; background-color: white;"&gt;3128&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then with reference to those last two readings I need to identify any meters where the reading has not increased since the previous reading. I was thinking of having another column which would show the difference of the reading from the one above it.&lt;/P&gt;&lt;P&gt;Is this possible, and if so how?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 18:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141582#M21229</guid>
      <dc:creator>agsearle</dc:creator>
      <dc:date>2009-04-16T18:25:14Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141583#M21230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the two most recent readings, - I can't think of an elegant solution that would allow doing it in one load... AS a work around, you could do it in two steps:&lt;/P&gt;&lt;P&gt;1. Load all readings sorted by Reader and Date descenting and assign numbers to each reading - something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;load&lt;BR /&gt; Reader,&lt;BR /&gt; Date,&lt;BR /&gt; Reading,&lt;BR /&gt; if(Peek(Reader) &amp;lt;&amp;gt; Reader, 0, previous(ReadingNumber)) as ReadingNumber,&lt;BR /&gt; if(Peek(Reader) &amp;lt;&amp;gt; Reader, Reading, Reading - previous(Reading)) as ReadingDifference&lt;BR /&gt;resident&lt;BR /&gt; Readings&lt;BR /&gt;Order By&lt;BR /&gt; Reader, Date DESC&lt;BR /&gt;;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, as a second step, reload from this table only selecting ReadingNumber &amp;lt;=2&lt;/P&gt;&lt;P&gt;Between peek() and previous(), this should work. I always forget which one works better in what situation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 19:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141583#M21230</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-04-16T19:03:12Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141584#M21231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't seem to get that to work.&lt;/P&gt;&lt;P&gt;More importantly though, is the second part of my problem. See below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width:193pt;border-collapse:collapse;" width="256"&gt;&lt;COLGROUP&gt;&lt;COL style="width:57pt;mso-width-source:userset;mso-width-alt:2779;mso-outline-parent:collapsed;" width="76" /&gt;&lt;COL style="width:89pt;mso-width-source:userset;mso-width-alt:4315;mso-outline-parent:collapsed;" width="118" /&gt;&lt;COL style="width:47pt;mso-width-source:userset;mso-width-alt:2267;mso-outline-parent:collapsed;" width="62" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD class="xl22" height="17" style="width:57pt;height:12.75pt;background-color:#ebebeb;border:gainsboro 0.5pt solid;" width="76"&gt;&lt;STRONG&gt;Installation&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro 0.5pt solid;border-left:gainsboro;width:89pt;border-bottom:gainsboro 0.5pt solid;background-color:#ebebeb;" width="118"&gt;&lt;STRONG&gt;Reading Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro 0.5pt solid;border-left:gainsboro;width:47pt;border-bottom:gainsboro 0.5pt solid;background-color:#ebebeb;" width="62"&gt;&lt;STRONG&gt;Reading&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;16/05/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;2874&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;16/05/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;2874&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;13/06/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;2899&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;18/07/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;2929&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;18/07/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;2929&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;19/09/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;2985&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;12/12/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;3053&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000103&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;13/03/2009&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;3128&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000123&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;04/04/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;143&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000123&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;09/10/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;165&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000130&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;30/04/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;393&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000130&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;30/10/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;488&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000152&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;12/06/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;208&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000152&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;08/12/2008&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;209&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:white;"&gt;40000158&lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;23/08/2008&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:white;"&gt;40633&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl25" height="17" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro 0.5pt solid;border-bottom:gainsboro 0.5pt solid;height:12.75pt;background-color:whitesmoke;"&gt;40000158&lt;/TD&gt;&lt;TD align="right" class="xl26" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;06/02/2009&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-right:gainsboro 0.5pt solid;border-top:gainsboro;border-left:gainsboro;border-bottom:gainsboro 0.5pt solid;background-color:whitesmoke;"&gt;42143&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This is a selection of the data in the report. So according to each installation, where the reading date is not the same, I need to know what the difference between each reading is, in a new column.&lt;/P&gt;&lt;P&gt;Complicated I know, but I'm sure someone knows how to do it? &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 22:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141584#M21231</guid>
      <dc:creator>agsearle</dc:creator>
      <dc:date>2009-04-16T22:00:52Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141585#M21232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to make sure I understand this...&lt;/P&gt;&lt;P&gt;In a table that is grouped by Installation and Reading Date, you want to see the difference in a 4th column if more than one Reading value is present for an Installation/Reading Date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 22:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141585#M21232</guid>
      <dc:creator />
      <dc:date>2009-04-16T22:14:51Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141586#M21233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that's it exactly.&lt;/P&gt;&lt;P&gt;The idea being that it will identify any meters that are not recording any water between readings, so we can investigate them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 22:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141586#M21233</guid>
      <dc:creator>agsearle</dc:creator>
      <dc:date>2009-04-16T22:20:13Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141587#M21234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to make a field that concatenates the Installation and ReadingDate in the script to use in the set expression first but then this should work (syntax may need to be adjusted as well).&lt;/P&gt;&lt;P&gt;=Max({$&amp;lt;InstallationReadingDateField = {'=NumericCount(DISTINCT Reading)&amp;gt;1'}&amp;gt;} Reading) - Min({$&amp;lt;InstallationReadingDateField = {'=NumericCount(DISTINCT Reading)&amp;gt;1'}&amp;gt;} Reading)&lt;/P&gt;&lt;P&gt;This would take the max value on any dates with more than one distinct reading and subtract the minimum value from it giving you a variance for the entire day. The nice part is that the formula would then also be scalable for any number of readings in a single day.&lt;/P&gt;&lt;P&gt;It sounds, though, like you may need something different so it only shows installations with the same reading since those would be the ones not working in which case this would be better in a table with Installation and Reading Date.&lt;/P&gt;&lt;P&gt;=If(NumericCount(DISTINCT Reading)=1 AND NumericCount(Reading)&amp;gt;1, 'Identifier Text')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 22:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141587#M21234</guid>
      <dc:creator />
      <dc:date>2009-04-16T22:47:21Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141588#M21235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent Aaron, liked the second part, worked well thanks. It now shows all the readings that have not changed.&lt;/P&gt;&lt;P&gt;Just one more thing though, but very similar. I also need to identify all meters where the difference between the readings is less than 5. This will show meters that are slowing, but not quite stopped.&lt;/P&gt;&lt;P&gt;Can a similar script work for these?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 17:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141588#M21235</guid>
      <dc:creator>agsearle</dc:creator>
      <dc:date>2009-04-17T17:07:21Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141589#M21236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first expression should work, but you'll need to add a bit to it. It will need an if statement to exclude any variance over 5.&lt;/P&gt;&lt;P&gt;If(Max({$&amp;lt;InstallationReadingDateField = {'=NumericCount(DISTINCT Reading)&amp;gt;1'}&amp;gt;} Reading) - Min({$&amp;lt;InstallationReadingDateField = {'=NumericCount(DISTINCT Reading)&amp;gt;1'}&amp;gt;} Reading)&amp;lt;=5, Max({$&amp;lt;InstallationReadingDateField = {'=NumericCount(DISTINCT Reading)&amp;gt;1'}&amp;gt;} Reading) - Min({$&amp;lt;InstallationReadingDateField = {'=NumericCount(DISTINCT Reading)&amp;gt;1'}&amp;gt;} Reading))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 19:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141589#M21236</guid>
      <dc:creator />
      <dc:date>2009-04-17T19:58:31Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141590#M21237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All sounds good, and I've tried to incorporate this into my report, but I have a problem.&lt;/P&gt;&lt;P&gt;I'm not able to create the concatenated field 'InstallationReadingDateField', as the two fields are in different tables. I've tried to map them into one, but then can't concatenate them.&lt;/P&gt;&lt;P&gt;Here's what I've got so far, and I've underlined the part that doesn't work.&lt;/P&gt;&lt;P&gt;&lt;I&gt;EABLG_MAP:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;MAPPING&lt;/B&gt; &lt;B&gt;LOAD&lt;/B&gt; Internal_ID_For_Meter_Reading_Document,&lt;BR /&gt;Installation&lt;BR /&gt;&lt;B&gt;FROM&lt;/B&gt; &lt;D&gt; (qvd)&lt;BR /&gt;&lt;B&gt;WHERE&lt;/B&gt; EXISTS (Installation);&lt;/D&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;EABL:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;LOAD&lt;/B&gt; Internal_ID_For_Meter_Reading_Document,&lt;BR /&gt;Meter_Reading_Date,&lt;BR /&gt;Equipment_Number,&lt;BR /&gt;Device,&lt;BR /&gt;Meter_Reading_Type,&lt;BR /&gt;Places_Before_Decimal_Point_In_Meter_Reading &lt;B&gt;as&lt;/B&gt; Reading,&lt;BR /&gt;APPLYMAP ('EABLG_MAP', Internal_ID_For_Meter_Reading_Document) &lt;B&gt;as&lt;/B&gt; Installation_EABL,&lt;BR /&gt;Installation_EABL &amp;amp; ' ' &amp;amp; Meter_Reading_Date &lt;B&gt;as&lt;/B&gt; Installation_Reading_Date,&lt;BR /&gt;Register&lt;BR /&gt;&lt;B&gt;FROM&lt;/B&gt; &lt;D&gt; (qvd)&lt;BR /&gt;&lt;B&gt;WHERE&lt;/B&gt; EXISTS (Equipment_Number)&lt;BR /&gt;&lt;B&gt;AND&lt;/B&gt; Meter_Reading_Type = '01'&lt;BR /&gt;&lt;B&gt;OR&lt;/B&gt; Meter_Reading_Type = '02'&lt;BR /&gt;&lt;B&gt;OR&lt;/B&gt; Meter_Reading_Type = '03'&lt;BR /&gt;&lt;B&gt;OR&lt;/B&gt; Meter_Reading_Type = '06'&lt;BR /&gt;&lt;B&gt;OR&lt;/B&gt; Meter_Reading_Type = '09'&lt;BR /&gt;&lt;B&gt;OR&lt;/B&gt; Meter_Reading_Type = '21'&lt;BR /&gt;&lt;B&gt;OR&lt;/B&gt; Meter_Reading_Type = '22';&lt;/D&gt;&lt;/P&gt;&lt;P&gt;Any new idea's? [:'(]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 20:32:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141590#M21237</guid>
      <dc:creator>agsearle</dc:creator>
      <dc:date>2009-04-20T20:32:53Z</dc:date>
    </item>
    <item>
      <title>Calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141591#M21238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;you are trying to use a new field Installation_EABL in the same load statement where you calculated it - you can't do that. The field is not available yet at that point. You need to either use a preceding load or repeat your APPLYMAP statement once again, like this:&lt;/P&gt;&lt;P&gt;APPLYMAP ('EABLG_MAP', Internal_ID_For_Meter_Reading_Document) &lt;B&gt;as&lt;/B&gt; Installation_EABL,&lt;BR /&gt;APPLYMAP ('EABLG_MAP', Internal_ID_For_Meter_Reading_Document) &amp;amp; ' ' &amp;amp; Meter_Reading_Date &lt;B&gt;as&lt;/B&gt; Installation_Reading_Date,&lt;/P&gt;&lt;P&gt;Also, as a suggestion - you need to add a default value for your applymap, just in case an the Date doesn't exist, otherwise you'll get the Internal_ID instead of the date.&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;Oleg&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 01:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-field/m-p/141591#M21238</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-04-21T01:04:38Z</dc:date>
    </item>
  </channel>
</rss>

