<?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: Find the maximum value in pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979263#M527918</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is where you need Advanced Aggregation! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to find the Max value across all values in a row of a Pivot Table, you need to calculate your &amp;lt;formula&amp;gt; at the most detailed level (in your case, by Customer and Stage) and then find the Max value across these pre-aggregated values, aggregated by Customer. So, something like this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AGGR( nodistinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAX(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGGR( nodistinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;formula&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Customer, Stage)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;, Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can learn more about Advanced Aggregation from my new book, &lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=HEF4KYLLE22XIQH2&amp;quot;&amp;gt;QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense&amp;lt;/a&amp;gt;&amp;lt;img src=&amp;quot;http://ir-na.amazon-adsystem.com/e/ir?t=natursyner0f-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1118949552"&gt;QlikView Your Business&lt;/A&gt;, or by attending one of the future sessions of the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for QlikView&lt;/A&gt;, where I teach Set Analysis and Advanced Aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Oct 2015 20:18:08 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2015-10-14T20:18:08Z</dc:date>
    <item>
      <title>Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979262#M527917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, we chart our sales through a series of stages, 20, 40, 60, 80, and won/lost. The expression portion of the table looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="stageprogress.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102035_stageprogress.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I used the "AFTER()" function to set background colours, depending on the length of time the sale was in a particular stage. However, I have been asked to modify this to find the SINGLE stage for each customer (not shown, but they are the first dimension) where the sale has sat the longest, and set that background colour to red.For example, on the 11th row, I would subtract the 60 date from today, and since that's more than the difference between the 40 and 60 stage (6/8-4/29 &amp;lt;&amp;lt; 10/14-6/8), I would just colour the 60 date red. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there's only one stage shown, I need to set that to red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, if the sale has gone 'backwards' (e.g. 7th row above, where it went from 60 on May 2 to 20 on June 7), I need to set that to red. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last part (backwards) is pretty easy, but how would I find the max in say, line 16 (4/2/15,4/17/15,5/6/15) succinctly? I guess I could do it with a ton of nested IF statements, but I was wondering if there was a more elegant way to do it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any assistance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 19:55:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979262#M527917</guid>
      <dc:creator />
      <dc:date>2015-10-14T19:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979263#M527918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is where you need Advanced Aggregation! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to find the Max value across all values in a row of a Pivot Table, you need to calculate your &amp;lt;formula&amp;gt; at the most detailed level (in your case, by Customer and Stage) and then find the Max value across these pre-aggregated values, aggregated by Customer. So, something like this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AGGR( nodistinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAX(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGGR( nodistinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;formula&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Customer, Stage)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;, Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can learn more about Advanced Aggregation from my new book, &lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=HEF4KYLLE22XIQH2&amp;quot;&amp;gt;QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense&amp;lt;/a&amp;gt;&amp;lt;img src=&amp;quot;http://ir-na.amazon-adsystem.com/e/ir?t=natursyner0f-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1118949552"&gt;QlikView Your Business&lt;/A&gt;, or by attending one of the future sessions of the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for QlikView&lt;/A&gt;, where I teach Set Analysis and Advanced Aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 20:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979263#M527918</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-10-14T20:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979264#M527919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;Have you access to the script?&lt;/P&gt;&lt;P&gt;Maybe it will be easier to do your expressions in the charts if you have already calculated the time between a stage and the preceding one in the datamodel. So, then, with a simple set analysis you will be able to compare the duration with the max per individual.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 04:01:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979264#M527919</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-15T04:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979265#M527920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As advised by @Vincent, (If you don't have access to Script)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use a set analysis like {max()} to get the desired result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 04:12:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979265#M527920</guid>
      <dc:creator>SreeniJD</dc:creator>
      <dc:date>2015-10-15T04:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979266#M527921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max value can be found using rangemax, see if something like below can be replicated, not sure though, &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="color.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102057_color.PNG" style="height: 74px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Used experession - If(Column(1)=RangeMax(Column(1),Column(2),Column(3)),Red()) in the background color of first expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 06:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979266#M527921</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-10-15T06:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979267#M527922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, Oleg. I will give that a try. I didn't know you could nest AGGR functions.&lt;/P&gt;&lt;P&gt;I had tried aggr(Max(ChDate),Company, Stage) but that didn't work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 11:26:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979267#M527922</guid>
      <dc:creator />
      <dc:date>2015-10-15T11:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979268#M527923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm going to try that, but is that a pivot table or a straight table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I pivoted the "change date" in my table, so rather than use "col(1)", I guess I'll have to use "below()" functions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it's an interesting concept. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:17:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979268#M527923</guid>
      <dc:creator />
      <dc:date>2015-10-16T14:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Find the maximum value in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979269#M527924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do that in my script but unfortunately, the sales progression is rarely linear; a sale will go from 20 to 40 to 60 back to 20, etc. I'm still struggling with how to calculate and identify those steps properly, and I need feedback from my internal customers on what they want to see. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-maximum-value-in-pivot-table/m-p/979269#M527924</guid>
      <dc:creator />
      <dc:date>2015-10-16T14:19:25Z</dc:date>
    </item>
  </channel>
</rss>

