<?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 Fractile an Expression in a Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Fractile-an-Expression-in-a-Pivot-Table/m-p/925454#M650085</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a Pivot table that is supposed to show a value in the cell and then be color coded based on the percentile that value is in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am having is that when I add the expression to determine the fractile in the background color the pivot table expands to show all values for the dimensions rather than what I have selected.&amp;nbsp; Here is the example of what I am dealing with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Pivot table has 3 dimensions.&amp;nbsp; LastName and FirstName are the left two columns and Market is across the top in row 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The cell shows a score for each person in each market based on an expression in a variable: (=$(Score))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the background color expression is:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;=if($(Score) &amp;gt;= $(Score_50), RGB(0,128,), RGB(255,0,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;Then the variable expression for the variable Score_50 is (I shortened it to make it easier to understand):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;fractile&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;nodistinct&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt; (&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Past_Year_Sales&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;)&amp;gt;50,3,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;+&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;if(avg&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;SPAN class="s2" style="font-size: 10pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sales_Price&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;)&amp;gt;100,5,1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;), LastName, Market), 0.5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the real issue is that even though I have selected to show 3 people in the pivot table (3 LastNames), the table shows all 50 people, but only has correct Scores for the people I have selected.&amp;nbsp; What I need to know is what can I do to the Score_50 formula to make sure that the 50th percentile value is correct across each individual Market, but also so that it doesn't keep expanding my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry if this is confusing to people, but I would much appreciate any help on this matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2015 13:36:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-23T13:36:44Z</dc:date>
    <item>
      <title>Fractile an Expression in a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Fractile-an-Expression-in-a-Pivot-Table/m-p/925454#M650085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a Pivot table that is supposed to show a value in the cell and then be color coded based on the percentile that value is in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am having is that when I add the expression to determine the fractile in the background color the pivot table expands to show all values for the dimensions rather than what I have selected.&amp;nbsp; Here is the example of what I am dealing with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Pivot table has 3 dimensions.&amp;nbsp; LastName and FirstName are the left two columns and Market is across the top in row 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The cell shows a score for each person in each market based on an expression in a variable: (=$(Score))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the background color expression is:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;=if($(Score) &amp;gt;= $(Score_50), RGB(0,128,), RGB(255,0,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;Then the variable expression for the variable Score_50 is (I shortened it to make it easier to understand):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;fractile&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;nodistinct&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt; (&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt; line-height: 1.5em;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Past_Year_Sales&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;)&amp;gt;50,3,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;+&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;if(avg&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;SPAN class="s2" style="font-size: 10pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;[Market Radius]&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-size: 10pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Market&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sales_Price&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-size: 10pt;"&gt;)&amp;gt;100,5,1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;), LastName, Market), 0.5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the real issue is that even though I have selected to show 3 people in the pivot table (3 LastNames), the table shows all 50 people, but only has correct Scores for the people I have selected.&amp;nbsp; What I need to know is what can I do to the Score_50 formula to make sure that the 50th percentile value is correct across each individual Market, but also so that it doesn't keep expanding my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry if this is confusing to people, but I would much appreciate any help on this matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s2" style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 13:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fractile-an-Expression-in-a-Pivot-Table/m-p/925454#M650085</guid>
      <dc:creator />
      <dc:date>2015-09-23T13:36:44Z</dc:date>
    </item>
  </channel>
</rss>

