<?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 value below fractile in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622824#M477791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with NODISTINCT keyword like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Max(If(Salary&amp;lt;=Aggr(NODISTINCT fractile(Salary,0.25),Dept),Salary ))&lt;/P&gt;&lt;P&gt;=Min(If(Salary&amp;gt;Aggr(NODISTINCT fractile(Salary,0.75),Dept),Salary ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Apr 2014 05:25:17 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2014-04-11T05:25:17Z</dc:date>
    <item>
      <title>Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622813#M477780</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 a set of salaries and would like to find the lowest/highest value below or over a fractile. The fractile function gives me the cut-off point but how do i get the highest or lowest value below or over the cut-off point?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have the set below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Payroll:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Salary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 45000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 67000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fractile(total Salary,0.25) gives me the cut-off point 8000 but how do I get the value 5000? And fractile(total Salary,0.75) gives me the cut-off point 24000 but how do I get the value 30000?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 09:00:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622813#M477780</guid>
      <dc:creator>Amphan</dc:creator>
      <dc:date>2014-04-10T09:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622814#M477781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try something like:&lt;/P&gt;&lt;P&gt;=Max(If(Salary&amp;lt;fractile(total Salary,0.25) ,Salary))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // for immediate below value&lt;/P&gt;&lt;P&gt;=Min(If(Salary&amp;gt;fractile(total Salary,0.75) ,Salary))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // for immediate up value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 09:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622814#M477781</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-10T09:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622815#M477782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you tresesco! It works beautifully on the above dataset, however I have problems with the solution when adding a dimension to it. If I add a department dimension and try to&amp;nbsp; do the same per department I don't get the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Payroll:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dept,Salary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT01,3000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT02,4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT02,5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT01,9000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT02,11000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT03,13000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT01,17000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT02,19000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT03,22000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT01,30000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT02,45000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPT03,67000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using &lt;STRONG&gt;fractile(total &amp;lt;Dept&amp;gt; Salary,0.25)&lt;/STRONG&gt; and &lt;STRONG&gt;=Max(If(Salary&amp;lt;fractile(total &amp;lt;Dept&amp;gt; Salary,0.25) ,Salary))&lt;/STRONG&gt; as expressions in av pivot table produces this chart:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image 1.png" class="jive-image" src="/legacyfs/online/56964_Image 1.png" style="width: 620px; height: 205px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I go about getting the desired value per department?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 10:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622815#M477782</guid>
      <dc:creator>Amphan</dc:creator>
      <dc:date>2014-04-10T10:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622816#M477783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try removing Salary as the dimension. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 10:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622816#M477783</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-10T10:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622817#M477784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately it gives the same result:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="56965" alt="Image 2.png" class="jive-image" src="/legacyfs/online/56965_Image 2.png" /&gt;&lt;/P&gt;&lt;P&gt;Ola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 10:47:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622817#M477784</guid>
      <dc:creator>Amphan</dc:creator>
      <dc:date>2014-04-10T10:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622818#M477785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;=Max(If(Salary&amp;lt;fractile(total Salary,0.25) ,Salary))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;The right one I believe:&lt;/P&gt;&lt;P&gt;=Max(If(Salary&amp;lt; Aggr(fractile(Salary,0.25),Dept) ,Salary),Dept)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 10:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622818#M477785</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-10T10:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622819#M477786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it doesn't take the department into account.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image 3.png" class="jive-image" src="/legacyfs/online/56978_Image 3.png" style="width: 620px; height: 205px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image 4.png" class="jive-image" src="/legacyfs/online/56979_Image 4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to get 13000 for DEPT03. Using TOTAL Salary without &amp;lt;Dept&amp;gt; makes fractile calulate on the whole set and not only per &amp;lt;Dept&amp;gt;. Is there someway to accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 11:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622819#M477786</guid>
      <dc:creator>Amphan</dc:creator>
      <dc:date>2014-04-10T11:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622820#M477787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check my updated expression:&lt;/P&gt;&lt;P&gt;=Max(If(Salary&amp;lt; Aggr(fractile(Salary,0.25),Dept) ,Salary),Dept)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 11:09:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622820#M477787</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-10T11:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622821#M477788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beautiful! It produces the desired result. I think I understand the expression but what does the last &lt;STRONG&gt;Dept&lt;/STRONG&gt; do?&lt;/P&gt;&lt;P&gt;=Max(If(Salary&amp;lt; Aggr(fractile(Salary,0.25),Dept) ,Salary),&lt;STRONG&gt;Dept&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when I change it to =Max(If(Salary &lt;STRONG&gt;&amp;lt;=&lt;/STRONG&gt; Aggr(fractile(Salary,0.25),Dept) ,Salary),Dept) I expected DEPT02 to get the value 5000 but it doesn't?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if I use it on =Min(If(Salary &lt;STRONG&gt;&amp;gt;=&lt;/STRONG&gt; Aggr(fractile(Salary,0.75),Dept) ,Salary),Dept) it again produces nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image 5.png" class="jive-image" src="/legacyfs/online/56980_Image 5.png" style="width: 620px; height: 128px;" /&gt;&lt;/P&gt;&lt;P&gt;It seems that I do not understand the expression, could you please explain it so I can use it for the above mentioned cases?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 11:36:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622821#M477788</guid>
      <dc:creator>Amphan</dc:creator>
      <dc:date>2014-04-10T11:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622822#M477789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Last &lt;STRONG&gt;Dept&amp;nbsp; &lt;/STRONG&gt;is a typo, and doesn't through an error because it takes as parameter to indicate rank. Please remove that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 11:41:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622822#M477789</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-10T11:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622823#M477790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, but why doesn't &lt;STRONG&gt;=Min(If(Salary &amp;gt; Aggr(fractile(Salary,0.75),Dept) ,Salary))&lt;/STRONG&gt; or even&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Max(If(Salary &amp;lt;= Aggr(fractile(Salary,0.25),Dept),Salary))&lt;/STRONG&gt; (note the &amp;lt;= ) work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for taking the time to educate me &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;Ola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 11:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622823#M477790</guid>
      <dc:creator>Amphan</dc:creator>
      <dc:date>2014-04-10T11:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622824#M477791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with NODISTINCT keyword like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Max(If(Salary&amp;lt;=Aggr(NODISTINCT fractile(Salary,0.25),Dept),Salary ))&lt;/P&gt;&lt;P&gt;=Min(If(Salary&amp;gt;Aggr(NODISTINCT fractile(Salary,0.75),Dept),Salary ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 05:25:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622824#M477791</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-11T05:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Max value below fractile</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622825#M477792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much, it really saved my weekend!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 12:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-below-fractile/m-p/622825#M477792</guid>
      <dc:creator>Amphan</dc:creator>
      <dc:date>2014-04-11T12:45:50Z</dc:date>
    </item>
  </channel>
</rss>

