<?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 Set analysis when month field has dual value. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859933#M301080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your variable does not have anything in it you might want to check it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as swuel already suggested you need to use search, though if you only want the max selected month do something like this&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Month={"&amp;lt;=$(=$(vMaxMonth))&amp;gt;=$(=$(vMaxMonth))"}&amp;gt;}Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2015 23:07:28 GMT</pubDate>
    <dc:creator>ramoncova06</dc:creator>
    <dc:date>2015-06-09T23:07:28Z</dc:date>
    <item>
      <title>Max Month in Set analysis when month field has dual value.</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859930#M301077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a month field that has text value like 'Jan, Feb, Mar' etc. In order to sort it properly in a list box, I used a dual() function to assign it a numerical value. However, my set analysis with Max Month stops working....&lt;/P&gt;&lt;P&gt;When more than one months are selected, I want the sum(amount) for the biggest month.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I created a variable vMaxMonth = Max(Month) and use this expression to calculate the biggest month's total amount with this expression: =sum({&amp;lt;Month={$vMaxMonth}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;However it returned 0 instead of 300. see screenshot below and attached pvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help with that?&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;Zixiao&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sample.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88871_sample.PNG" style="width: 620px; height: 476px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 22:34:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859930#M301077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-09T22:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month in Set analysis when month field has dual value.</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859931#M301078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can probably use a numeric comparison in a search:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Month = {"&amp;gt;=$(vMaxMonth)"} &amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, create your variable like&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Month, -Month)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 22:54:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859931#M301078</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-09T22:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month in Set analysis when month field has dual value.</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859932#M301079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The variable vMaxMonth does not have a value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using the expression below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Month={"$(=MaxString(Month))"}&amp;gt;}Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 23:05:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859932#M301079</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2015-06-09T23:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Max Month in Set analysis when month field has dual value.</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859933#M301080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your variable does not have anything in it you might want to check it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as swuel already suggested you need to use search, though if you only want the max selected month do something like this&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Month={"&amp;lt;=$(=$(vMaxMonth))&amp;gt;=$(=$(vMaxMonth))"}&amp;gt;}Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 23:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Month-in-Set-analysis-when-month-field-has-dual-value/m-p/859933#M301080</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-06-09T23:07:28Z</dc:date>
    </item>
  </channel>
</rss>

