<?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: Maximum value of strings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114746#M17696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;More for the sake of demonstrating Qlik's flexibility in how to calculate various things I present these two alternative expressions that don't use Aggr() to calculate Max Share:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum (TOTAL {&amp;lt;Product={'Product 1'},Filial={"=Rank(Sum({&amp;lt;Product={'Product 1'}&amp;gt;} Amount)/Sum(Amount))=1"}&amp;gt;} Amount) / Sum(TOTAL {&amp;lt;Filial={"=Rank(Sum({&amp;lt;Product={'Product 1'}&amp;gt;} Amount)/Sum(Amount))=1"}&amp;gt;} Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeMax(Top( [Share Product 1],1,NoOfRows()))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will both calculate the same as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Max(TOTAL Aggr(Sum ({&amp;lt;Product = {'Product 1'}&amp;gt;} Amount)/Sum (Amount), Filial))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2018 12:56:33 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2018-08-23T12:56:33Z</dc:date>
    <item>
      <title>Maximum value of strings</title>
      <link>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114743#M17693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;In the column "Share Product 1", I calculate the share of sales of product 1 from sales total for each filial:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;Sum ({&amp;lt;Product = {'Product 1'}&amp;gt;}Amount)/Sum (Amount)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot_1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/211592_Screenshot_1.png" style="height: 236px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I need to calculate the maximum share of product 1 among all the filials and the deviation from this share.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Help me please.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 09:37:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114743#M17693</guid>
      <dc:creator>kolov007</dc:creator>
      <dc:date>2018-08-23T09:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum value of strings</title>
      <link>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114744#M17694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Evgen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max( &lt;SPAN style="color: #ff0000;"&gt;Total&lt;/SPAN&gt; aggr(Sum ({&amp;lt;Product = {'Product 1'}&amp;gt;}Amount)/Sum (Amount), Filial))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 10:20:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114744#M17694</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-08-23T10:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum value of strings</title>
      <link>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114745#M17695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For max share&lt;/P&gt;&lt;P&gt;=max(TOTAL aggr(Sum ({&amp;lt;Product = {'Product 1'}&amp;gt;} Amount)/Sum (Amount), Filial))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difference&lt;/P&gt;&lt;P&gt;=[Share Product 1]-[Max Share]&lt;/P&gt;&lt;P&gt;&lt;IMG alt="ScrTest6.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/211587_ScrTest6.png" style="height: 226px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 10:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114745#M17695</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2018-08-23T10:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum value of strings</title>
      <link>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114746#M17696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;More for the sake of demonstrating Qlik's flexibility in how to calculate various things I present these two alternative expressions that don't use Aggr() to calculate Max Share:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum (TOTAL {&amp;lt;Product={'Product 1'},Filial={"=Rank(Sum({&amp;lt;Product={'Product 1'}&amp;gt;} Amount)/Sum(Amount))=1"}&amp;gt;} Amount) / Sum(TOTAL {&amp;lt;Filial={"=Rank(Sum({&amp;lt;Product={'Product 1'}&amp;gt;} Amount)/Sum(Amount))=1"}&amp;gt;} Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeMax(Top( [Share Product 1],1,NoOfRows()))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will both calculate the same as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Max(TOTAL Aggr(Sum ({&amp;lt;Product = {'Product 1'}&amp;gt;} Amount)/Sum (Amount), Filial))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 12:56:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maximum-value-of-strings/m-p/114746#M17696</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-08-23T12:56:33Z</dc:date>
    </item>
  </channel>
</rss>

