<?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: Finding the maximum per expression value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320604#M1188113</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; It wont work cause you need to give only field name, you cant use the calculated field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thats why it is much to have week as field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2011 10:07:00 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2011-10-07T10:07:00Z</dc:date>
    <item>
      <title>Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320596#M1188105</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'm new to this forum so first of all Hello Everyone &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to find a maximum per expression value? Let me give an example. I have two dimensions: ClientName and TradeDate (dd/mm/yyyy). I want to find the maximum date per month per client, so per ClientName and month(TradeDate). I cannot make any changes to the database, so I cannot just map TradeDates into e.g. TradeMonths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The outcome should look like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Client&amp;nbsp; TradeDate&amp;nbsp;&amp;nbsp;&amp;nbsp; MaxDateInClient&amp;amp;Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/01/2011&amp;nbsp; &lt;STRONG&gt;20/01/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp; 11/01/2011&amp;nbsp; &lt;STRONG&gt;20/01/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/01/2011&amp;nbsp; &lt;STRONG&gt;20/01/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/02/2011 &lt;STRONG&gt; 25/02/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp; 04/02/2011&amp;nbsp; &lt;STRONG&gt;25/02/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp; 25/02/2011&amp;nbsp; &lt;STRONG&gt;25/02/2011&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 08:47:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320596#M1188105</guid>
      <dc:creator />
      <dc:date>2011-10-07T08:47:49Z</dc:date>
    </item>
    <item>
      <title>Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320597#M1188106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you don't need every single row in your table, try this:&lt;/P&gt;&lt;P&gt;Create a straight table with "Client" and "Month(TradeDate)" as the two dims. The Expression is "date(max(TradeDate))".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;htH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 09:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320597#M1188106</guid>
      <dc:creator />
      <dc:date>2011-10-07T09:04:55Z</dc:date>
    </item>
    <item>
      <title>Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320598#M1188107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply but I actually need to have the TradeDate dimension in the table as well, so I actually need every single row, unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 09:12:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320598#M1188107</guid>
      <dc:creator />
      <dc:date>2011-10-07T09:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320599#M1188108</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have a look at the sample file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope this is what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 09:12:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320599#M1188108</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-10-07T09:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320600#M1188109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry, but then I think then you are in a trap. &lt;/P&gt;&lt;P&gt;My assumption was, that you are not able to change the datamodell. If you want to show all rows you need a field like TradeMonth. Take a look at the post of Kaushik above. &lt;/P&gt;&lt;P&gt;There you find the new dim and the expression similar to my second suggestion:&lt;/P&gt;&lt;P&gt;"Date(max( TOTAL &amp;lt;TradeMonth&amp;gt; TradeDate))"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 09:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320600#M1188109</guid>
      <dc:creator />
      <dc:date>2011-10-07T09:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320601#M1188110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would work great but I cannot make any changes to the database and have no influence on how it's "loaded" to QV, cannot edit the script and therefore I cannot create an additional dimension in the script called Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 09:43:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320601#M1188110</guid>
      <dc:creator />
      <dc:date>2011-10-07T09:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320602#M1188111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;as you are online right now, straight forward:&lt;/P&gt;&lt;P&gt;It Seems you need to contact the script-writer to spend you a new field "TradeMonth". This should not be to hard for her/him.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 09:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320602#M1188111</guid>
      <dc:creator />
      <dc:date>2011-10-07T09:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320603#M1188112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it would be possible to write a formula like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max( total &amp;lt;Client, Month(TradeDate)&amp;gt; TradeDate) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and that I just didn't know the syntax but it seems it cannot be done this way. Thanks for your time and effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 10:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320603#M1188112</guid>
      <dc:creator />
      <dc:date>2011-10-07T10:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320604#M1188113</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; It wont work cause you need to give only field name, you cant use the calculated field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thats why it is much to have week as field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 10:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320604#M1188113</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-10-07T10:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum per expression value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320605#M1188114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kaushik is right (sorry). Take a look at this snippet out of online-help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;&lt;A name="kanchor236"&gt;&lt;/A&gt;max&lt;SPAN&gt;&lt;A name="max"&gt;&lt;/A&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;[{set_expression}]&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;[&lt;/SPAN&gt;&lt;SPAN&gt; distinct &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;] [&lt;/SPAN&gt;&lt;SPAN&gt; total &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;[&amp;lt;fld {, fld}&amp;gt;]&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;] expression [, rank]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you can see that after the "total" within the "&amp;lt;&amp;gt;" are only field(-name)s valid.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RR&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 12:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-maximum-per-expression-value/m-p/320605#M1188114</guid>
      <dc:creator />
      <dc:date>2011-10-07T12:03:51Z</dc:date>
    </item>
  </channel>
</rss>

