<?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>article Missing Manual - Top() and Bottom() in Member Articles</title>
    <link>https://community.qlik.com/t5/Member-Articles/Missing-Manual-Top-and-Bottom/ta-p/1490805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: center;"&gt;&lt;IMG __jive_id="82248" alt="1f4fe19.jpg" class="jive-image image-12" height="37" src="https://community.qlik.com/legacyfs/online/83434_1f4fe19.jpg" style="height: 37px; float: left; width: 37px;" width="37" /&gt;Have you ever wondered how the examples from the Qlikview help may look like?&lt;/P&gt;&lt;P style="text-align: center;"&gt;Please see below and enjoy responsibly...&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 18pt; text-decoration: underline; font-family: 'book antiqua', palatino;"&gt;&lt;STRONG&gt;&lt;EM&gt;Top() and Bottom()&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="83627" alt="topbottom.jpg" class="jive-image image-44" height="112" src="https://community.qlik.com/legacyfs/online/83627_topbottom.jpg" style="height: 112px; float: right; width: 218.46913580246914px;" width="218" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Returns the value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; evaluated with the chart's dimension values as they appear on the last row of the current column segment in a table or, in the case of bitmap charts, in the chart's straight table equivalent.&lt;/P&gt;&lt;P&gt;If the chart is one-dimensional or if the &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; is preceded by the &lt;SPAN class="Bold"&gt;total&lt;/SPAN&gt; qualifier, the current column segment is always equal to the entire column.&lt;/P&gt;&lt;P&gt;If the table or table equivalent has multiple vertical dimensions, the current column segment will include only rows with the same values as the current row in all dimension columns except for the column showing the last dimension in the inter field sort order. The inter field sort order for pivot tables is defined simply by the order of the dimensions from left to right. For other chart types this can be manipulated in the &lt;SPAN class="Bold"&gt;Chart Properties: Sort&lt;/SPAN&gt; dialog. ...&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="81776" class="jive-image image-4" height="34" src="https://community.qlik.com/legacyfs/online/83436_pastedImage_0.png" style="width: 96px; height: 34.1052631578947px;" width="96" /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Returns value from&amp;nbsp; first (&lt;SPAN style="color: #0000ff;"&gt;Top&lt;/SPAN&gt;) or last&lt;SPAN style="font-size: 13.3333330154419px;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Bottom&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;) &lt;/SPAN&gt;row(s) per each group&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="; color: #575757; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #575757; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Syntax:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;IMG __jive_id="83444" alt="2015-04-11 07_14_48-Edit Expression.png" class="jive-image image-40" src="/legacyfs/online/83444_2015-04-11 07_14_48-Edit Expression.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;IMG __jive_id="83445" alt="2015-04-11 07_17_10-Edit Expression.png" class="jive-image image-41" src="/legacyfs/online/83445_2015-04-11 07_17_10-Edit Expression.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;STRONG&gt;TOTAL[&amp;lt;fld{,fld}&amp;gt;]]expr - &lt;/STRONG&gt;expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;&lt;STRONG&gt;offset - &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if greater that 0 will move the evaluation of expression to rows &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: left;"&gt;further&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; down or above&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;STRONG&gt;count - &lt;/STRONG&gt;this parameter will only works with Chart Range Function (like RangeSum), it will specify the numbers of rows to be taken for calculations.(Please see last example)&lt;/SPAN&gt;&lt;SPAN style="text-align: left;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Data Model:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;(Copy and Pasted below code into Edit Script window and reload)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Year ,Month ,Sales&lt;/P&gt;&lt;P&gt;2015 ,January, 10&lt;/P&gt;&lt;P&gt;2015, February,20&lt;/P&gt;&lt;P&gt;2015 ,March ,30&lt;/P&gt;&lt;P&gt;2014 ,January ,40&lt;/P&gt;&lt;P&gt;2014 ,February,50&lt;/P&gt;&lt;P&gt;2014 ,March ,60&lt;/P&gt;&lt;P&gt;2013 ,January ,70&lt;/P&gt;&lt;P&gt;2013 ,February ,80&lt;/P&gt;&lt;P&gt;2013 ,March,90&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's build a Straight Table with &lt;STRONG&gt;Year and Month&lt;/STRONG&gt; as dimensions and expressions as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 1:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;The &lt;EM&gt;left&lt;/EM&gt; hand side shows use of &lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;STRONG&gt;Sales)&lt;/STRONG&gt; the&lt;EM&gt; right&lt;/EM&gt; hand side result from our new expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier; text-decoration: underline;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="83433" alt="2015-04-11 07_00_33-Microsoft Excel - Book1.png" class="jive-image image-39" src="/legacyfs/online/83433_2015-04-11 07_00_33-Microsoft Excel - Book1.png" style="color: #000000; font-family: 'courier new', courier; font-size: 16px; height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For each row the returned value is the same as the &lt;STRONG&gt;bottom&lt;/STRONG&gt; value for this group: 30,60.90&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier; text-decoration: underline;"&gt;&lt;STRONG&gt;top&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;IMG __jive_id="83495" alt="2015-04-13 00_15_13-Microsoft Excel - Tabela Cruzada.xlsx.png" class="image-42 jive-image" src="/legacyfs/online/83495_2015-04-13 00_15_13-Microsoft Excel - Tabela Cruzada.xlsx.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="text-align: center;"&gt;For each row the returned value is the same as the &lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt; value for this group: 10,40,70&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;By specifying the second criteria as &lt;STRONG&gt;2&lt;/STRONG&gt; , the returning value is the second value from the &lt;STRONG&gt;top &lt;/STRONG&gt;or&lt;STRONG&gt; bottom&lt;/STRONG&gt; of each group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;In this example&lt;STRONG&gt; top&lt;/STRONG&gt; and &lt;STRONG&gt;bottom&lt;/STRONG&gt; are giving &lt;SPAN style="text-decoration: underline;"&gt;the same&lt;/SPAN&gt; result (the middle value) as we have 3 data points for each group&lt;/SPAN&gt;&lt;SPAN style="; font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt;"&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; &lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier; font-size: 16px;"&gt;-----------&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;top&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt; ), 2 )&lt;IMG __jive_id="83543" alt="13-Apr-15 12-33-06 PM.jpg" class="image-43 jive-image" src="/legacyfs/online/83543_13-Apr-15 12-33-06 PM.jpg" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&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; &lt;SPAN style="color: #0000ff; text-align: center; font-size: 12pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier; font-size: 16px;"&gt;-----------&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt; ), 2 )&lt;IMG __jive_id="83543" alt="13-Apr-15 12-33-06 PM.jpg" class="jive-image" src="/legacyfs/online/83543_13-Apr-15 12-33-06 PM.jpg" style="display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;SPAN style="; color: #0000ff; font-size: 14pt; text-decoration: underline; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ffffff; text-decoration: underline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; text-decoration: underline;"&gt;top&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 13.3333330154419px; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;TOTAL sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: blue; font-size: 14pt; font-family: 'courier new', courier; text-decoration: underline;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt; sum&lt;/SPAN&gt;( &lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&lt;IMG __jive_id="83628" alt="14-Apr-15 1-47-41 PM.jpg" class="jive-image image-45" src="/legacyfs/online/83628_14-Apr-15 1-47-41 PM.jpg" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Adding &lt;SPAN style="; color: #0000ff; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;TOTAL&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="text-decoration: underline;"&gt;before&lt;/SPAN&gt; Sum will result with the &lt;STRONG&gt;first&lt;/STRONG&gt; or &lt;STRONG&gt;last&lt;/STRONG&gt; value to be assigned to &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; rows.(&lt;STRONG&gt;Total&lt;/STRONG&gt; will ignore dimension)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;RangeAvg()&lt;/SPAN&gt; takes 3 parameters&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;expression ---&amp;gt;&lt;STRONG&gt; &lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'courier new', courier;"&gt;Top/Bottom&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;-offset of rows---&amp;gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;number of rows to sum---&amp;gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; margin-bottom: .0001pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; margin-bottom: .0001pt; font-family: 'courier new', courier;"&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; &lt;/SPAN&gt;&lt;SPAN style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial, sans-serif; color: black;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'courier new', courier;"&gt;rangeavg&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 14pt;"&gt;&lt;STRONG&gt;Top&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;),1,2))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="83641" alt="14-Apr-15 2-56-03 PM.jpg" class="image-46 jive-image" src="/legacyfs/online/83641_14-Apr-15 2-56-03 PM.jpg" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For&lt;STRONG&gt; &lt;SPAN style="text-decoration: underline;"&gt;each group&lt;/SPAN&gt; &lt;/STRONG&gt;in right table&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Each row is average of values from two top rows for each group (first we are moving &lt;STRONG&gt;1&lt;/STRONG&gt; row above current row and then adding &lt;STRONG&gt;2&lt;/STRONG&gt; rows)&lt;/LI&gt;&lt;/UL&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="text-align: center; font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial, sans-serif; color: black;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'courier new', courier;"&gt;rangeavg&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 14pt;"&gt;&lt;STRONG&gt;Bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;),1,2))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: center; color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;IMG __jive_id="83642" alt="14-Apr-15 3-51-08 PM.jpg" class="image-47 jive-image" src="/legacyfs/online/83642_14-Apr-15 3-51-08 PM.jpg" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&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; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;each group&lt;/STRONG&gt;&lt;/SPAN&gt; in right table:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Each row is average of values from two bottom rows for each group (first we are going &lt;STRONG&gt;1&lt;/STRONG&gt; row down current&amp;nbsp; rowand then adding &lt;STRONG&gt;2&lt;/STRONG&gt; rows)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Still feeling hungry?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8146"&gt;How to use - Only()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-7963"&gt;Do you Qualify?- How to use QUALIFY statement&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-7969"&gt;How to use - Dimensionality()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8030"&gt;Missing Manual - GetFieldSelections() + Bonus Example&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8019"&gt;MaxString &amp;amp;amp; MinString - How to + examples&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8006"&gt;The second dimension... or how to use secondarydimensionality()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8242"&gt;Missing Manual - Below() and Above()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8106"&gt;How to use- Dual()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8205"&gt;Missing Manual - Before() and After()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8150"&gt;How to use - MissingCount()&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-8301"&gt;Missing Manual - Top() and Bottom()&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Apr 2015 06:03:11 GMT</pubDate>
    <dc:creator>robert_mika</dc:creator>
    <dc:date>2015-04-11T06:03:11Z</dc:date>
    <item>
      <title>Missing Manual - Top() and Bottom()</title>
      <link>https://community.qlik.com/t5/Member-Articles/Missing-Manual-Top-and-Bottom/ta-p/1490805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: center;"&gt;&lt;IMG __jive_id="82248" alt="1f4fe19.jpg" class="jive-image image-12" height="37" src="https://community.qlik.com/legacyfs/online/83434_1f4fe19.jpg" style="height: 37px; float: left; width: 37px;" width="37" /&gt;Have you ever wondered how the examples from the Qlikview help may look like?&lt;/P&gt;&lt;P style="text-align: center;"&gt;Please see below and enjoy responsibly...&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 18pt; text-decoration: underline; font-family: 'book antiqua', palatino;"&gt;&lt;STRONG&gt;&lt;EM&gt;Top() and Bottom()&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="83627" alt="topbottom.jpg" class="jive-image image-44" height="112" src="https://community.qlik.com/legacyfs/online/83627_topbottom.jpg" style="height: 112px; float: right; width: 218.46913580246914px;" width="218" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Returns the value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; evaluated with the chart's dimension values as they appear on the last row of the current column segment in a table or, in the case of bitmap charts, in the chart's straight table equivalent.&lt;/P&gt;&lt;P&gt;If the chart is one-dimensional or if the &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; is preceded by the &lt;SPAN class="Bold"&gt;total&lt;/SPAN&gt; qualifier, the current column segment is always equal to the entire column.&lt;/P&gt;&lt;P&gt;If the table or table equivalent has multiple vertical dimensions, the current column segment will include only rows with the same values as the current row in all dimension columns except for the column showing the last dimension in the inter field sort order. The inter field sort order for pivot tables is defined simply by the order of the dimensions from left to right. For other chart types this can be manipulated in the &lt;SPAN class="Bold"&gt;Chart Properties: Sort&lt;/SPAN&gt; dialog. ...&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="81776" class="jive-image image-4" height="34" src="https://community.qlik.com/legacyfs/online/83436_pastedImage_0.png" style="width: 96px; height: 34.1052631578947px;" width="96" /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Returns value from&amp;nbsp; first (&lt;SPAN style="color: #0000ff;"&gt;Top&lt;/SPAN&gt;) or last&lt;SPAN style="font-size: 13.3333330154419px;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Bottom&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;) &lt;/SPAN&gt;row(s) per each group&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="; color: #575757; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #575757; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Syntax:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;IMG __jive_id="83444" alt="2015-04-11 07_14_48-Edit Expression.png" class="jive-image image-40" src="/legacyfs/online/83444_2015-04-11 07_14_48-Edit Expression.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;IMG __jive_id="83445" alt="2015-04-11 07_17_10-Edit Expression.png" class="jive-image image-41" src="/legacyfs/online/83445_2015-04-11 07_17_10-Edit Expression.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;STRONG&gt;TOTAL[&amp;lt;fld{,fld}&amp;gt;]]expr - &lt;/STRONG&gt;expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;&lt;STRONG&gt;offset - &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if greater that 0 will move the evaluation of expression to rows &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: left;"&gt;further&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; down or above&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left;"&gt;&lt;STRONG&gt;count - &lt;/STRONG&gt;this parameter will only works with Chart Range Function (like RangeSum), it will specify the numbers of rows to be taken for calculations.(Please see last example)&lt;/SPAN&gt;&lt;SPAN style="text-align: left;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Data Model:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;(Copy and Pasted below code into Edit Script window and reload)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Year ,Month ,Sales&lt;/P&gt;&lt;P&gt;2015 ,January, 10&lt;/P&gt;&lt;P&gt;2015, February,20&lt;/P&gt;&lt;P&gt;2015 ,March ,30&lt;/P&gt;&lt;P&gt;2014 ,January ,40&lt;/P&gt;&lt;P&gt;2014 ,February,50&lt;/P&gt;&lt;P&gt;2014 ,March ,60&lt;/P&gt;&lt;P&gt;2013 ,January ,70&lt;/P&gt;&lt;P&gt;2013 ,February ,80&lt;/P&gt;&lt;P&gt;2013 ,March,90&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's build a Straight Table with &lt;STRONG&gt;Year and Month&lt;/STRONG&gt; as dimensions and expressions as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 1:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;The &lt;EM&gt;left&lt;/EM&gt; hand side shows use of &lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;STRONG&gt;Sales)&lt;/STRONG&gt; the&lt;EM&gt; right&lt;/EM&gt; hand side result from our new expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier; text-decoration: underline;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="83433" alt="2015-04-11 07_00_33-Microsoft Excel - Book1.png" class="jive-image image-39" src="/legacyfs/online/83433_2015-04-11 07_00_33-Microsoft Excel - Book1.png" style="color: #000000; font-family: 'courier new', courier; font-size: 16px; height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For each row the returned value is the same as the &lt;STRONG&gt;bottom&lt;/STRONG&gt; value for this group: 30,60.90&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----------&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier; text-decoration: underline;"&gt;&lt;STRONG&gt;top&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;IMG __jive_id="83495" alt="2015-04-13 00_15_13-Microsoft Excel - Tabela Cruzada.xlsx.png" class="image-42 jive-image" src="/legacyfs/online/83495_2015-04-13 00_15_13-Microsoft Excel - Tabela Cruzada.xlsx.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="text-align: center;"&gt;For each row the returned value is the same as the &lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt; value for this group: 10,40,70&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;By specifying the second criteria as &lt;STRONG&gt;2&lt;/STRONG&gt; , the returning value is the second value from the &lt;STRONG&gt;top &lt;/STRONG&gt;or&lt;STRONG&gt; bottom&lt;/STRONG&gt; of each group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;In this example&lt;STRONG&gt; top&lt;/STRONG&gt; and &lt;STRONG&gt;bottom&lt;/STRONG&gt; are giving &lt;SPAN style="text-decoration: underline;"&gt;the same&lt;/SPAN&gt; result (the middle value) as we have 3 data points for each group&lt;/SPAN&gt;&lt;SPAN style="; font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt;"&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; &lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier; font-size: 16px;"&gt;-----------&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;top&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt; ), 2 )&lt;IMG __jive_id="83543" alt="13-Apr-15 12-33-06 PM.jpg" class="image-43 jive-image" src="/legacyfs/online/83543_13-Apr-15 12-33-06 PM.jpg" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="text-align: center;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&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; &lt;SPAN style="color: #0000ff; text-align: center; font-size: 12pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier; font-size: 16px;"&gt;-----------&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New'; color: black;"&gt; ), 2 )&lt;IMG __jive_id="83543" alt="13-Apr-15 12-33-06 PM.jpg" class="jive-image" src="/legacyfs/online/83543_13-Apr-15 12-33-06 PM.jpg" style="display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;SPAN style="; color: #0000ff; font-size: 14pt; text-decoration: underline; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ffffff; text-decoration: underline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; text-decoration: underline;"&gt;top&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 13.3333330154419px; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt;TOTAL sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: blue; font-size: 14pt; font-family: 'courier new', courier; text-decoration: underline;"&gt;&lt;STRONG&gt;bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;SPAN style="color: blue;"&gt; sum&lt;/SPAN&gt;( &lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt; )&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;)&lt;IMG __jive_id="83628" alt="14-Apr-15 1-47-41 PM.jpg" class="jive-image image-45" src="/legacyfs/online/83628_14-Apr-15 1-47-41 PM.jpg" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Adding &lt;SPAN style="; color: #0000ff; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;TOTAL&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="text-decoration: underline;"&gt;before&lt;/SPAN&gt; Sum will result with the &lt;STRONG&gt;first&lt;/STRONG&gt; or &lt;STRONG&gt;last&lt;/STRONG&gt; value to be assigned to &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; rows.(&lt;STRONG&gt;Total&lt;/STRONG&gt; will ignore dimension)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Example 4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;RangeAvg()&lt;/SPAN&gt; takes 3 parameters&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;expression ---&amp;gt;&lt;STRONG&gt; &lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'courier new', courier;"&gt;Top/Bottom&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;-offset of rows---&amp;gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;number of rows to sum---&amp;gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; margin-bottom: .0001pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; margin-bottom: .0001pt; font-family: 'courier new', courier;"&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; &lt;/SPAN&gt;&lt;SPAN style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial, sans-serif; color: black;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'courier new', courier;"&gt;rangeavg&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 14pt;"&gt;&lt;STRONG&gt;Top&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;),1,2))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="83641" alt="14-Apr-15 2-56-03 PM.jpg" class="image-46 jive-image" src="/legacyfs/online/83641_14-Apr-15 2-56-03 PM.jpg" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For&lt;STRONG&gt; &lt;SPAN style="text-decoration: underline;"&gt;each group&lt;/SPAN&gt; &lt;/STRONG&gt;in right table&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Each row is average of values from two top rows for each group (first we are moving &lt;STRONG&gt;1&lt;/STRONG&gt; row above current row and then adding &lt;STRONG&gt;2&lt;/STRONG&gt; rows)&lt;/LI&gt;&lt;/UL&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="text-align: center; font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial, sans-serif; color: black;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'courier new', courier;"&gt;rangeavg&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: black;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 14pt;"&gt;&lt;STRONG&gt;Bottom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;),1,2))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: center; color: black; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;IMG __jive_id="83642" alt="14-Apr-15 3-51-08 PM.jpg" class="image-47 jive-image" src="/legacyfs/online/83642_14-Apr-15 3-51-08 PM.jpg" style="height: auto; display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 12pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&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; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;each group&lt;/STRONG&gt;&lt;/SPAN&gt; in right table:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Each row is average of values from two bottom rows for each group (first we are going &lt;STRONG&gt;1&lt;/STRONG&gt; row down current&amp;nbsp; rowand then adding &lt;STRONG&gt;2&lt;/STRONG&gt; rows)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Still feeling hungry?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8146"&gt;How to use - Only()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-7963"&gt;Do you Qualify?- How to use QUALIFY statement&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-7969"&gt;How to use - Dimensionality()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8030"&gt;Missing Manual - GetFieldSelections() + Bonus Example&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8019"&gt;MaxString &amp;amp;amp; MinString - How to + examples&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8006"&gt;The second dimension... or how to use secondarydimensionality()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8242"&gt;Missing Manual - Below() and Above()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8106"&gt;How to use- Dual()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8205"&gt;Missing Manual - Before() and After()&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-8150"&gt;How to use - MissingCount()&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-8301"&gt;Missing Manual - Top() and Bottom()&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2015 06:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/Missing-Manual-Top-and-Bottom/ta-p/1490805</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-04-11T06:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Manual - Top() and Bottom()</title>
      <link>https://community.qlik.com/t5/Member-Articles/Missing-Manual-Top-and-Bottom/tac-p/1490806#M1690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice one &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 09:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Member-Articles/Missing-Manual-Top-and-Bottom/tac-p/1490806#M1690</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-07-14T09:34:44Z</dc:date>
    </item>
  </channel>
</rss>

