<?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 Year and Latest Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773312#M274369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a date field?&amp;nbsp; If so just do max(date).&amp;nbsp; It's the same as max year and max month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2015 04:22:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-24T04:22:11Z</dc:date>
    <item>
      <title>Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773305#M274362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to display sum of payments for the current year and latest month in my set of data. I have checked several threads on the discussion board and none have provided a solution. My set analysis is currently:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&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;PayYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=Max(PayYear))'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PayMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=Max(PayMonth))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[DIST AMT USD]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum keeps coming out to 0 ... What am I missing? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 21:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773305#M274362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-23T21:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773306#M274363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum({&amp;lt;PayYear={'=$(=Max(PayYear))'}, PayMonth={'=$(=Max(PayMonth))'}&amp;gt;}[DIST AMT USD])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I would suggest as creating them as variables&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 03:15:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773306#M274363</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-03-24T03:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773307#M274364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or try&lt;/P&gt;&lt;P&gt;sum({&amp;lt;PayYear={"=$(=Max(PayYear))"}, PayMonth={"=$(=Max(PayMonth))"}&amp;gt;}[DIST AMT USD]) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 03:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773307#M274364</guid>
      <dc:creator>danieloberbilli</dc:creator>
      <dc:date>2015-03-24T03:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773308#M274365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue you are facing here that&amp;nbsp; if your Max month is let say 8 but the year does not reach that point you will get zero.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Year,Month&lt;/P&gt;&lt;P&gt;2015,3&lt;/P&gt;&lt;P&gt;2014,5&lt;/P&gt;&lt;P&gt;The Max Year is 2015, the MaxMonth is 8 but MaxYear&amp;amp;MaxMonth =0.&lt;/P&gt;&lt;P&gt;I can not give you answer but you need somehow first extract the array of 2015 and then based on that look for Max of this year.&lt;/P&gt;&lt;P&gt;This is easy in Excel where you can use array formulas The results is 2+22+26=52&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81631_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 03:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773308#M274365</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-03-24T03:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773309#M274366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;take max(year), min&lt;BR /&gt;(month) of the years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 03:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773309#M274366</guid>
      <dc:creator>hariprasadqv</dc:creator>
      <dc:date>2015-03-24T03:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773310#M274367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this. its working fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month should be in number format&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;PayYear={$(=max(PayYear))},PayMonth={$(=max(PayMonth))}&amp;gt;}[DIST AMT USD])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 03:56:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773310#M274367</guid>
      <dc:creator>sagarkharpude</dc:creator>
      <dc:date>2015-03-24T03:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773311#M274368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;Simply calculated Max Year &amp;amp; Max Month, if u directly write max month in expression as per suggested by Robert u will not get proper result.&lt;/P&gt;&lt;P&gt;Declare variable as :-&lt;/P&gt;&lt;P&gt;vMaxYear = max(Year)&lt;/P&gt;&lt;P&gt;vMaxMonth = max({&amp;lt;Year = {"$(vMaxYear)"}&amp;gt;}Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use above variable in expression as&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PayYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={"$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMaxYear &lt;/SPAN&gt;)"}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PayMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={"$(vMaxMonth)")'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[DIST AMT USD]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 04:11:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773311#M274368</guid>
      <dc:creator>mukesh24</dc:creator>
      <dc:date>2015-03-24T04:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Max Year and Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773312#M274369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a date field?&amp;nbsp; If so just do max(date).&amp;nbsp; It's the same as max year and max month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 04:22:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Year-and-Latest-Month/m-p/773312#M274369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-24T04:22:11Z</dc:date>
    </item>
  </channel>
</rss>

