<?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 problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346311#M128131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your last expression is basically the solution. in my real data i have 1 field from an inline load (values: actual and Budget) i use this field as a second dimension and put an if statement in my expression if(Dim=Actual, sum(actcosts), sum(budget)... in combination with that field i just don´t get it work. do you also have an idea for that? thanks so much for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2012 09:47:40 GMT</pubDate>
    <dc:creator>michael_maeuser</dc:creator>
    <dc:date>2012-06-11T09:47:40Z</dc:date>
    <item>
      <title>Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346305#M128125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a problem with my precalculation. There are many different versions. The version with the highest number is always the newest one. So I want a table that standardly shows the newest version. But if I select another version it should change. Then I put max in set analysis. But this way it ignores the product no. Attached is sample data. Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 07:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346305#M128125</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2012-06-11T07:13:59Z</dc:date>
    </item>
    <item>
      <title>Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346306#M128126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=FirstSortedValue(Costs, -CalcVersion) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression in your table chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to sum Costs, you could also use:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=FirstSortedValue(aggr(sum(Costs),Product,CalcVersion),-CalcVersion)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;EM&gt;,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 07:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346306#M128126</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-11T07:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346307#M128127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it´s close, but there can be the same calcversion several times. and then i need to sum all the costs. see attached file...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 09:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346307#M128127</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2012-06-11T09:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346308#M128128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;found the solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(Sum ({&amp;lt;CalcVersion = {$(=Max(CalcVersion))}, Month=,Year=&amp;gt;}Costs), Product)&lt;/P&gt;&lt;P&gt;Thanks anyway!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 09:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346308#M128128</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2012-06-11T09:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346309#M128129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will only show a value for the product with the total maximum CalcVersion. Is this what you want?&lt;/P&gt;&lt;P&gt;The set analysis is calculated once per chart, not per dimension value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't found anything different in your last sample file compared to your first one, so I assume you have unintentionally attached again the first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also try something like&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=aggr(if(CalcVersion=max(total&amp;lt;Product&amp;gt; CalcVersion),sum(Costs)),Product,CalcVersion)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 09:18:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346309#M128129</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-11T09:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346310#M128130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah I just noticed my idea doesn´t work perfect. need to check&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 09:19:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346310#M128130</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2012-06-11T09:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346311#M128131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your last expression is basically the solution. in my real data i have 1 field from an inline load (values: actual and Budget) i use this field as a second dimension and put an if statement in my expression if(Dim=Actual, sum(actcosts), sum(budget)... in combination with that field i just don´t get it work. do you also have an idea for that? thanks so much for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 09:47:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346311#M128131</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2012-06-11T09:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346312#M128132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So your Dim is based on a data island?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(Dim=Actual&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,aggr(if(CalcVersion=max(total&amp;lt;Product&amp;gt; CalcVersion),sum(actcosts)),Product,CalcVersion)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,aggr(if(CalcVersion=max(total&amp;lt;Product&amp;gt; CalcVersion),sum(budget)),Product,CalcVersion)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or am I missing something completely?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 09:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346312#M128132</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-11T09:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346313#M128133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes it´s an island. i already had exactly the expression you suggested. but somehow it seems like that qlikview automatically thinks it´s actual. if i create an table with dimension product and the artificial field plus the expression &lt;EM&gt;=aggr(if(CalcVersion=max(total&amp;lt;Product&amp;gt; CalcVersion),sum(Costs)),Product,CalcVersion), then i only see actual. i thought i should see the same values for actual and budget since it is an data island...&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 10:01:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346313#M128133</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2012-06-11T10:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346314#M128134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I just noticed it should probably be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(Dim = '&lt;STRONG&gt;Actual'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. using single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you could / should try using a NODISTINCT qualifier to see the duplicate value in your table for both DIM values (since aggr() uses an implicite DISTINCT qualifier):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=aggr( NODISTINCT if(CalcVersion=max(total&amp;lt;Product&amp;gt; CalcVersion),sum(Costs)),Product,CalcVersion)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't fully understood your issue, could you post a small sample app?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 10:08:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346314#M128134</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-11T10:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Max problem</title>
      <link>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346315#M128135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that was the solution! perfect!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 11:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-problem/m-p/346315#M128135</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2012-06-11T11:00:32Z</dc:date>
    </item>
  </channel>
</rss>

