<?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 Timestamp in Set in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318392#M497180</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's for sticking in there with me Stefan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2011 00:40:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-15T00:40:15Z</dc:date>
    <item>
      <title>Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318381#M497169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a problem with an expression and can't get it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to select the last cost adjustment record for a selected manufacturing order using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TransCode&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {'CA'}, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Transaction Timestamp]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;"=max(timestamp#([Transaction Timestamp]))"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Average Cost]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Where CA is the transaction code for cost adjustments there can be only one CA for any given transaction timestamp.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In this example there are two cost adjustments:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cost Adjustments.gif" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/8613_Cost+Adjustments.gif" width="450" /&gt;&lt;/P&gt;&lt;P&gt;The following is the result in a chart which is the sum of the Cost After values. I would have thought that the criteria for Max timestamp would have only returned the last of the transaction set which is 11/09/2011 11:52:02 AM and not the sum of both records.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cost.gif" class="jive-image" src="https://community.qlik.com/legacyfs/online/8614_Cost.gif" /&gt;&lt;/P&gt;&lt;P&gt;Hope you can point me in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 16:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318381#M497169</guid>
      <dc:creator />
      <dc:date>2011-11-14T16:24:27Z</dc:date>
    </item>
    <item>
      <title>Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318382#M497170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt; TransCode&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {'CA'}, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Transaction Timestamp]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {'$(=Timestamp(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;max({&amp;lt;TransCode = {'CA'} &amp;gt;} timestamp#([Transaction Timestamp]))))'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Average Cost]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 16:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318382#M497170</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-14T16:38:14Z</dc:date>
    </item>
    <item>
      <title>Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318383#M497171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Stefan but that expression results in 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I converted the my original expression using both the literal timestamp and I get the correct results. As in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TransCode&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {'CA'}, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Transaction Timestamp]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {'11/09/2011 11:52:02 AM'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Average Cost]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which leads me to believe the problem lies in &lt;/P&gt;&lt;P&gt;{&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;"=max(timestamp#([Transaction Timestamp]))"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Any thoughts?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Rich&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 18:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318383#M497171</guid>
      <dc:creator />
      <dc:date>2011-11-14T18:10:24Z</dc:date>
    </item>
    <item>
      <title>Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318384#M497172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Richard, I would tend to agree. First, is your field "Transaction Timestamp" actually stored as a timestamp and not a string? You should make sure that you're reading it in as a timestamp in the script, which will actually assign it an underlying numeric value (much easier to deal with for purposes of set analysis). So your script would look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;timestamp#([Transaction Timestamp],'MM/DD/YYYY hh:mm:ss TT') as [Transaction Timestamp]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your set can be just: {&amp;lt;TransCode = {'CA'}, [Transaction Timestamp] = {$(=max([Transaction Timestamp]))}&amp;gt;}&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿[Transaction Timestamp]&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 18:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318384#M497172</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-11-14T18:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318385#M497173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max() will always return a numeric value, null otherwise. So you will need to represent that number in a Timestamp manner, as Stefan suggested above, like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum({$&amp;lt; TransCode = {'CA'}, [Transaction Timestamp] = {"$(=TimeStamp(Max([Transaction Timestamp]), 'MM/DD/YYYY hh:mm:ss TT'))"} &amp;gt;} [Average Cost])&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check for missing values, just in case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;BI Consultant&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 18:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318385#M497173</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-11-14T18:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318386#M497174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Thanks for the reply Stefan but that expression results in 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I converted the my original expression using both the literal timestamp and I get the correct results. As in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;TransCode&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {'CA'}, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Transaction Timestamp]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {'11/09/2011 11:52:02 AM'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Average Cost]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which leads me to believe the problem lies in &lt;/P&gt;&lt;P&gt;{&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;"=max(timestamp#([Transaction Timestamp]))"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also believe that the problem lies here, and I tried to work only on that part this with my suggested solution (hope I haven't broke anything else).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our goal should be that the set element returns the exact above literal timestamp when evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still think that my solution should work, I created a small demo to demonstrate (see attached). (BTW, if you clear the expression label, the expression itself will be used, but displayed with dollar sign expansion evaluated, this is quite neat for debugging purposes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if you need the Timestamp#() function, but it shouldn't make things worse neither. What I think you do need is the additional&lt;/P&gt;&lt;P&gt;{&amp;lt;TransCode = {'CA'} &amp;gt;} set expression within the max() function to get the max timestamp for only these Codes, not for all possible (see also in my example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 20:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318386#M497174</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-14T20:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318387#M497175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that the expression works in your example but when I applied it to my app, I got zero results,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I attached a scaled down version of the application keeping only the data that applies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm certain the problem lies in a data mismatch, but I just don't see it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I ask you to take a look at the script? The time stamp is created from two AS400 fields. One is from a made date and the other is a time value. The source data ties into the QVW.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 21:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318387#M497175</guid>
      <dc:creator />
      <dc:date>2011-11-14T21:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318388#M497176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that the expression works in your example but when I applied it to my app, I got zero results,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I attached a scaled down version of the application keeping only the data that applies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm certain the problem lies in a data mismatch, but I just don't see it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I ask you to take a look at the script? The time stamp is created from two AS400 fields. One is from a made date and the other is a time value. The source data ties into the QVW.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 21:37:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318388#M497176</guid>
      <dc:creator />
      <dc:date>2011-11-14T21:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318389#M497177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I think that's the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using&lt;/P&gt;&lt;P&gt;timestamp#([Update Date] &amp;amp; ' ' &amp;amp; [Time Updated], 'MM/DD/YYYY hhmmss TT') As [Transaction Timestamp];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while I think you need to separate hours/minutes/seconds by :&lt;/P&gt;&lt;P&gt;timestamp#([Update Date] &amp;amp; ' ' &amp;amp; [Time Updated], 'MM/DD/YYYY &lt;STRONG&gt;hh:mm:ss&lt;/STRONG&gt; TT') As [Transaction Timestamp];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should also check your standard Timestamp setting, and/or be careful if you apply the date/timestamp functions without explicit format code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: attached the modified qvw, only expressions changed (not the script)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 21:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318389#M497177</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-14T21:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318390#M497178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed your suggestion Stefan to consistently format and using your expression and Miguel's expression, I was able to get results however, I would have hoped that the expression would have respected the uniqueness of each manufacturing order and form a set of the transaction with the max timestamp equal to code CA within the manufacturing order dimension. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that the exprssions are forming a set of the max transaction timestamp without to only the order with the max timestamp. Then when selections are made the results respect the order selection and display correctly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I updated to sample with multiple orders. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry to lean on you, but I've tried so many iterations I'm going in a circle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 00:04:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318390#M497178</guid>
      <dc:creator />
      <dc:date>2011-11-15T00:04:03Z</dc:date>
    </item>
    <item>
      <title>Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318391#M497179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue({&amp;lt;TransCode = {'CA'}&amp;gt;} [Average Cost],-[Transaction Timestamp])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 00:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318391#M497179</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-15T00:19:45Z</dc:date>
    </item>
    <item>
      <title>Timestamp in Set</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318392#M497180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's for sticking in there with me Stefan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 00:40:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-in-Set/m-p/318392#M497180</guid>
      <dc:creator />
      <dc:date>2011-11-15T00:40:15Z</dc:date>
    </item>
  </channel>
</rss>

