<?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: Evaluate expression for latest date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694466#M1056624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just add a date in your exp (&lt;STRONG&gt;bold&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {&amp;lt; Date = {"$(=&lt;STRONG&gt;date&lt;/STRONG&gt;(max(Date)))"}&amp;gt;} Value) /sum( {&amp;lt;Date = {"$(=&lt;STRONG&gt;date&lt;/STRONG&gt;(max(Date)))"}&amp;gt;} Quantity)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Oct 2014 18:50:29 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2014-10-24T18:50:29Z</dc:date>
    <item>
      <title>Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694464#M1056622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to get a product to evaluate it's unit cost by the last time it was changed in the system. I can't seem to get it working properly, based on other questions that have been posed in the past. I've checked quite a few other discussions, and none seem to solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Expression:&amp;nbsp; sum( {&amp;lt; Date = {"=$(=max(Date))"}&amp;gt;} Value)/sum( {&amp;lt;Date = {"=$(=max(Date))"}&amp;gt;} Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 17:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694464#M1056622</guid>
      <dc:creator />
      <dc:date>2014-10-24T17:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694465#M1056623</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;sum( {&amp;lt; Date = {'$(=Date(max(Date)))'}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum( {&amp;lt;Date = {'$(=Date(max(Date)))'}&amp;gt;} Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/69659_Capture.PNG.png" style="width: 620px; height: 274px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 18:13:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694465#M1056623</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-10-24T18:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694466#M1056624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just add a date in your exp (&lt;STRONG&gt;bold&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {&amp;lt; Date = {"$(=&lt;STRONG&gt;date&lt;/STRONG&gt;(max(Date)))"}&amp;gt;} Value) /sum( {&amp;lt;Date = {"$(=&lt;STRONG&gt;date&lt;/STRONG&gt;(max(Date)))"}&amp;gt;} Quantity)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 18:50:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694466#M1056624</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-10-24T18:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694467#M1056625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That appears to work in a small application with a few products. I'm now wrestling as to why it's not working with a larger data set.&amp;nbsp; With no selections at all, the table becomes a one row table with the product name and unit cost being null. However, if I select individual products or multiple products, it works fine. If I select all products, only one product shows and it's unit cost is null. Thoughts on why that isn't working? I've tried popping the data from the product that shows when all are selected into the file I uploaded and it works fine. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 19:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694467#M1056625</guid>
      <dc:creator />
      <dc:date>2014-10-24T19:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694468#M1056626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex , i'm not 100% sure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if you put this expression in a text box in your new model whether it bring back a real date ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=Date(max(Date))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 19:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694468#M1056626</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-10-24T19:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694469#M1056627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I've pinpointed the issue. If the latest date for a product has no corresponding value/quantity, it seems to break the entire table. I am trying to adjust the set analysis to check for the latest date with a non-null value and quantity. Thoughts on that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My thought would be to do a set analysis inside the max function which is inside the set analysis for a sum function?&lt;BR /&gt;Is that viable? How's the computation for that if that would be the solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 20:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694469#M1056627</guid>
      <dc:creator />
      <dc:date>2014-10-24T20:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694470#M1056628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would try just an IF statement within the MAX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change:&lt;/P&gt;&lt;P&gt;Max(Date)&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;Max(&amp;nbsp;&amp;nbsp; if( not (isnull(Value) or isnull(Quantity)) , Date) )&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 20:10:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694470#M1056628</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-10-24T20:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate expression for latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694471#M1056629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I feel dirty for using that, but it works. Thanks! Enjoy your weekend. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 20:24:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-expression-for-latest-date/m-p/694471#M1056629</guid>
      <dc:creator />
      <dc:date>2014-10-24T20:24:49Z</dc:date>
    </item>
  </channel>
</rss>

