<?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: Max date function in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982569#M335315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value returns zero instead of the price I want it to return, even if i add the {1} as u suggest.&lt;/P&gt;&lt;P&gt;Let me explain it very simply:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one product with a price history. When a price changes the date is recorded in : Prijshistorie_Peildatum&lt;/P&gt;&lt;P&gt;So irrgardless of what i select for time period I want to see the most recent price for the product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Oct 2015 14:09:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-10-28T14:09:52Z</dc:date>
    <item>
      <title>Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982566#M335312</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;Im trying to use a max date function in set analysis and this is the result after some digging in this forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Prijshistorie_Peildatum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=max(Prijshistorie_Peildatum))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;pvprijs&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, it does not work....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;It should only display the price of the most recent date. (as determined by ''Prijshistorie_Peildatum'')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;can someone spot what i did wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;kind regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Aart Noordegraaf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 13:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982566#M335312</guid>
      <dc:creator />
      <dc:date>2015-10-28T13:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982567#M335313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you tell us what does not work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is it shows the maximum Peildatum of your current selection. If you want it to show the maximum date while ignoring your selection, try this (notice the tiny thing I added to your max function):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Prijshistorie_Peildatum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=max(&lt;STRONG&gt;{1}&lt;/STRONG&gt; Prijshistorie_Peildatum))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;pvprijs&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 13:54:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982567#M335313</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2015-10-28T13:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982568#M335314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;May be try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;=Sum({&amp;lt;Prijshistorie_Peildatum={"$(=Date(Max(Prijshistorie_Peildatum), 'YourDateFieldFormat'))"}&amp;gt;} pvprijs&lt;/STRONG&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:01:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982568#M335314</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-28T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982569#M335315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value returns zero instead of the price I want it to return, even if i add the {1} as u suggest.&lt;/P&gt;&lt;P&gt;Let me explain it very simply:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one product with a price history. When a price changes the date is recorded in : Prijshistorie_Peildatum&lt;/P&gt;&lt;P&gt;So irrgardless of what i select for time period I want to see the most recent price for the product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:09:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982569#M335315</guid>
      <dc:creator />
      <dc:date>2015-10-28T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982570#M335316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;Prijshistorie_Peildatum &lt;/STRONG&gt;is text (&lt;SPAN style="font-size: 13.3333330154419px;"&gt;right aligned in listbox &lt;/SPAN&gt;) then use below expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;sum({&amp;lt;Prijshistorie_Peildatum={"$(=date#(max(Prijshistorie_Peildatum),'DD/MM/YYYY'))"}&amp;gt;}pvprijs)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;sum({&amp;lt;Prijshistorie_Peildatum={"$(=date(max(date#(Prijshistorie_Peildatum,'DD/MM/YYYY')),'DD/MM/YYYY'))"}&amp;gt;}pvprijs)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;If &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;Prijshistorie_Peildatum &lt;/STRONG&gt;is in Date format ( left aligned in listbox ) then use below expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Prijshistorie_Peildatum={"$(=date(max(Prijshistorie_Peildatum),'DD/MM/YYYY'))"}&amp;gt;}pvprijs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have assumed that your date for mat is &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;DD/MM/YYYY.&lt;/STRONG&gt; You can change the format according to your data&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982570#M335316</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-10-28T14:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982571#M335317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I now notice the single quotes. Remove those and try again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively:&lt;/P&gt;&lt;P&gt;Make a Straight table with in there only the products and the max(&lt;STRONG&gt;{1}&lt;/STRONG&gt; Prijshistorie_Peildatum) as expression to see what it results in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giving it more thought it might be that only the Products that have a Prijs with a Peildatum being the same as the maximum Peildatum will show up. So if the maximum Peildatum of a products is not the lower, it will not give a result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982571#M335317</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2015-10-28T14:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982572#M335318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kush&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if you think I am wrong, but if &lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Prijshistorie_Peildatum &lt;/STRONG&gt;&lt;/SPAN&gt;is text how will you compare it to a date field? &lt;SPAN style="text-decoration: line-through;"&gt;and even before that how would you calculate the max(ofTextField)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that transformation would have to take in the back end of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update: I guess you fixed part of my questions &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982572#M335318</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-28T14:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982573#M335319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the expression:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:21:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982573#M335319</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-10-28T14:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Max date function in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982574#M335320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still feel that if &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Prijshistorie_Peildatum &lt;/STRONG&gt;is text, the expression won't work because you would be comparing text to a date field. May be if you add Text() it might work. But have never tried that before so not sure if that will work or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:22:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-date-function-in-set-analysis/m-p/982574#M335320</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-28T14:22:49Z</dc:date>
    </item>
  </channel>
</rss>

