<?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 Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574453#M544804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have to have text-style months in your data then always use DUALs for Months.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2014 13:47:50 GMT</pubDate>
    <dc:creator>DavidFoster1</dc:creator>
    <dc:date>2014-03-28T13:47:50Z</dc:date>
    <item>
      <title>Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574447#M544797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have Year Field as 2010,2011,2012 and&lt;/P&gt;&lt;P&gt;Month Field as JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Getting Maximum Year , I have used =Max(Year). Its working fine and returns 2012&lt;/P&gt;&lt;P&gt;But for getting Maximum Month , I have used =Maxstring(Month). It not returns 'DEC' , Instead it returns 'SEP'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the maximum month as DEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me to sort out this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sivasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574447#M544797</guid>
      <dc:creator />
      <dc:date>2014-03-28T13:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574448#M544798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need to use months as numerical values (Max for example) I suggest you to use month as year + month so, if you have a date (myDate):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weekyear(myDate)*100 + month(myDate) as month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; monthname,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way you will have a numerical value for months that will help to find max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574448#M544798</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-03-28T13:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574449#M544799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=month(max(month))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574449#M544799</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-03-28T13:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574450#M544800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maxstring is sorting by alphabets...so S is the last alphabet in the month's list. so SEP is being returned.&lt;/P&gt;&lt;P&gt;you need to use dual function here...straight from the help section. look up dual in help and copy that example into your script. just change the field name to match yours and use months like JAN, 1; FEB, 2; etc. then you can call max(Month) and it will return DEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;straight from help section:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;load &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;dual&lt;/SPAN&gt; ( string,numrep ) as DayOfWeek inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;[ string,numrep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;Monday,0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;Tuesday,1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;Wednesday,2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;Thursday,3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;Friday,4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;Saturday,5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;Sunday,6 ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code"&gt;load Date, weekday(Date) as DayOfWeek from afile.csv;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script example will generate a field &lt;SPAN class="Italic"&gt;DayOfWeek&lt;/SPAN&gt; &lt;BR /&gt;with the weekdays written in clear text. QlikView will for all purposes regard &lt;BR /&gt;the field as a numeric field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use Marco's expression to get the string representation of the max month instead of the number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574450#M544800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-28T13:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574451#M544802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sivasu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this month and year are coming from some date field then instead of taking max(Month) use Month(max(date)).&lt;/P&gt;&lt;P&gt;This will give you latest date. But if you want max month then load one inline table with two fields i.e. Month and Month_Number and associate with this table and then take max(Month_Number) you will get dec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suhas Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:21:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574451#M544802</guid>
      <dc:creator />
      <dc:date>2014-03-28T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574452#M544803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try below in text box...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SubField('$(MonthNames)', ';' , Max(Month))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:43:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574452#M544803</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-28T13:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574453#M544804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have to have text-style months in your data then always use DUALs for Months.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574453#M544804</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2014-03-28T13:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574454#M544805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;=month(max(month))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can't use maxstring because it return maximum value by alphabets&amp;nbsp; and SEP start with S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 14:04:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month/m-p/574454#M544805</guid>
      <dc:creator />
      <dc:date>2014-03-28T14:04:35Z</dc:date>
    </item>
  </channel>
</rss>

