<?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: How to distribute values into quartiles evently? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-distribute-values-into-quartiles-evently/m-p/1344686#M413970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function I use to good effect is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CEIL(RANK([Value]), 4) / COUNT(TOTAL [Value]) * 4)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key being the RANK(Value, "Mode 4"): &lt;A href="https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/ChartFunctions/RankingFunctions/rank.htm"&gt;RANK Documentation&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Aug 2017 12:43:33 GMT</pubDate>
    <dc:creator>TKendrick20</dc:creator>
    <dc:date>2017-08-08T12:43:33Z</dc:date>
    <item>
      <title>How to distribute values into quartiles evently?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-distribute-values-into-quartiles-evently/m-p/1344684#M413968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlik folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table of values which I aim to dividing it into Quartiles as evenly as possible. The expression I use in the chart is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF( Value &amp;lt;= Fractile (TOTAL Value, 0.25),&lt;/P&gt;&lt;P&gt;'Quartile 1', &lt;/P&gt;&lt;P&gt;IF( Value &amp;lt;= Fractile (TOTAL Value, 0.50),&lt;/P&gt;&lt;P&gt;'Quartile 2',&lt;/P&gt;&lt;P&gt;IF( Value &amp;lt;= Fractile (TOTAL Value, 0.75),&lt;/P&gt;&lt;P&gt;'Quartile 3',&lt;/P&gt;&lt;P&gt;'Quartile 4')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does the job, however the distribution of values is not even as I have equal values which my expression tends to put them all in one quartile. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="quartile_1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/163359_quartile_1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the purpose of the analysis, I need the quartiles to have equal or at least near equal number of values. How can I achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Laleh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2017 11:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-distribute-values-into-quartiles-evently/m-p/1344684#M413968</guid>
      <dc:creator />
      <dc:date>2017-05-15T11:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to distribute values into quartiles evently?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-distribute-values-into-quartiles-evently/m-p/1344685#M413969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think if you want to get a rather equal number of values within the buckets you will rather need a rank-function, maybe something like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ceil(rank(total Value) / (count(total Value) / 4))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/164066_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 15:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-distribute-values-into-quartiles-evently/m-p/1344685#M413969</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-05-19T15:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to distribute values into quartiles evently?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-distribute-values-into-quartiles-evently/m-p/1344686#M413970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function I use to good effect is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CEIL(RANK([Value]), 4) / COUNT(TOTAL [Value]) * 4)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key being the RANK(Value, "Mode 4"): &lt;A href="https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/ChartFunctions/RankingFunctions/rank.htm"&gt;RANK Documentation&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2017 12:43:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-distribute-values-into-quartiles-evently/m-p/1344686#M413970</guid>
      <dc:creator>TKendrick20</dc:creator>
      <dc:date>2017-08-08T12:43:33Z</dc:date>
    </item>
  </channel>
</rss>

