<?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 Help with MAX in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321630#M579482</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 done this and it gives me a period but it is only right a very small percentage of the time....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it seems to work when the max sales are in the 1st month in the data..... but if the max is for example in period 10 but i have sales in periods 1, 2, 3, 4, 5, 6...... it shows the period as 1&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;ben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 11:24:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-27T11:24:21Z</dc:date>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321625#M579477</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;I have an expression that shows me what the Max sales qty of a product was in a period of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max({$&amp;lt;[Barcode Stock] = &amp;gt;}aggr(sum({$&amp;lt;[Barcode Stock] = ,[Rolling Period Stock]={"&amp;gt;=$(=vPeriodQuarterStartPast)&amp;lt;=$(=vRollingPeriod)"}&amp;gt;}[Qty Stock]),[Barcode Stock],[Rolling Period Stock]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works fine and returns the max qty of sales in the best period.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what I want is an expression to show me which period the sale was in....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 25%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Period&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Sum of Qty&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my expression would tell me the max sales qty was 25, and i'm after an expression to tell me the period was 3.&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;Ben.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 09:54:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321625#M579477</guid>
      <dc:creator />
      <dc:date>2012-02-27T09:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321626#M579478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, here it is. Let me know if you need anything else&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:42:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321626#M579478</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-02-27T10:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321627#M579479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pls try this one ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Sum of Qty]={$(=max([Sum of Qty]))}&amp;gt;}Period)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Antony.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:49:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321627#M579479</guid>
      <dc:creator />
      <dc:date>2012-02-27T10:49:58Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321628#M579480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi thanks for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have tried both but no luck as of yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the Sum of Qty is from this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max({$&amp;lt;[Barcode Stock] = &amp;gt;}aggr(sum({$&amp;lt;[Barcode Stock] = ,[Rolling Period Stock]={"&amp;gt;=$(=vPeriodQuarterStartPast)&amp;lt;=$(=vRollingPeriod)"}&amp;gt;}[Qty Stock]),[Barcode Stock],[Rolling Period Stock]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so there are multiple lines that need to be calculated to get the total max sales qty in each period. see below....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 25%; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc; border: #000000 1px solid;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Period&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc; border: #000000 1px solid;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Qty&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid;"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid;"&gt;2&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid;"&gt;3&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid;"&gt;4&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid;"&gt;5&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid;"&gt;6&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in Period 3 we had the max sales of 25....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:09:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321628#M579480</guid>
      <dc:creator />
      <dc:date>2012-02-27T11:09:35Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321629#M579481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ben, did you check my application? Please download it, go to&amp;nbsp; Settings --&amp;gt; Variable Overview, and where it says "a" paste your expression &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;max({$&amp;lt;[Barcode Stock] = &amp;gt;}aggr(sum({$&amp;lt;[Barcode Stock] = ,[Rolling Period Stock]={"&amp;gt;=$(=vPeriodQuarterStartPast)&amp;lt;=$(=vRollingPeriod)"}&amp;gt;}[Qty Stock]),[Barcode Stock],[Rolling Period Stock]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;OF course this should be done directly in your application but make sure to follow the logic in my application.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321629#M579481</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-02-27T11:12:55Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321630#M579482</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 done this and it gives me a period but it is only right a very small percentage of the time....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it seems to work when the max sales are in the 1st month in the data..... but if the max is for example in period 10 but i have sales in periods 1, 2, 3, 4, 5, 6...... it shows the period as 1&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;ben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:24:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321630#M579482</guid>
      <dc:creator />
      <dc:date>2012-02-27T11:24:21Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321631#M579483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it doesn't work is because your "max" formula is wrong. Please check your formula or upload your application so we can check it. We can't guess and work with "ghost" fields we don't see&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321631#M579483</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-02-27T11:31:03Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321632#M579484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could be right about my max formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cant upload my app as its to big....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need an expression to get the MAX sum(Qty) if the periods are between the 2 variables below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Rolling Period Stock]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;"&amp;gt;=$(=vPeriodQuarterStartPast)&amp;lt;=$(=vRollingPeriod)"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&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;Ben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:40:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321632#M579484</guid>
      <dc:creator />
      <dc:date>2012-02-27T11:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321633#M579485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you put a "=" in front of the variable name?&amp;nbsp; &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;=vPeriodQuarterStartPast&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Remove the =&amp;nbsp; from both variables and try again&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:47:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321633#M579485</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-02-27T11:47:44Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321634#M579486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try using this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =FirstSortedValue({$&amp;lt;[Barcode Stock] = &amp;gt;} &lt;STRONG style="font-size: 12px;"&gt;Period&lt;/STRONG&gt;,-aggr(sum({$&amp;lt;[Barcode Stock] = ,[Rolling Period Stock]={"&amp;gt;=$(=vPeriodQuarterStartPast)&amp;lt;=$(=vRollingPeriod)"}&amp;gt;}[Qty Stock]),[Barcode Stock],[Rolling Period Stock]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321634#M579486</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-02-27T11:49:13Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321635#M579487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works a treat!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:59:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321635#M579487</guid>
      <dc:creator />
      <dc:date>2012-02-27T11:59:21Z</dc:date>
    </item>
    <item>
      <title>Help with MAX</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321636#M579488</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;Slight issue though, with some of the products they have the same max qty in differentt periods so it is just returning an error...... any way i can add an if(expression = error,&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;return latest max&lt;/STRONG&gt;&lt;/SPAN&gt;,return normal max)&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;ben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 12:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-MAX/m-p/321636#M579488</guid>
      <dc:creator />
      <dc:date>2012-02-27T12:12:33Z</dc:date>
    </item>
  </channel>
</rss>

