Bottom - 圖表函數
Syntax:
Bottom([TOTAL] expr [ , offset [,count ]])
Return data type: 雙值
Arguments:
引數 | 描述 |
---|---|
|
包含待測量之資料的運算式或欄位。 |
offset |
將一個 若指定負值的位移,會讓 Bottom 函數的作用相當於包含對應正值位移的 Top 函數。 |
count |
將第三個參數 count 指定為大於 1,函數會傳回不是一個,而是 count 的範圍值,目前資料行區段的最後 count 列的每列一個值。 在這種形式下,該函數可作為任何特殊範圍函數的引數。 範圍函數 |
|
如果表格為單一維度或 TOTAL 限定詞作為引數,則目前資料行區段一律等於整個資料行。 |
Limitations:
遞迴呼叫會傳回
Examples and results:
Example: 1
本範例展示的表格螢幕擷取畫面中,表格視覺化是從維度
資料行
該表格也顯示更複雜的量值:一個是從 Sum(Sales)+Bottom(Sum(Sales)) 建立,另一個標記為
Example: 2
本範例展示的表格螢幕擷取畫面中,視覺化中新增了更多維度:
在第一個表格中,系統是根據 Month 評估運算式,而第二個表格中則是根據 Product 加以評估。量值 End value 包含運算式 Bottom(Sum(Sales))。Month 的底端列是
請參閱
Example: 3 |
結果 | ||
---|---|---|---|
Bottom 函數可做為範圍函數的輸入使用。例如:RangeAvg (Bottom(Sum(Sales),1,3))。 |
在 Bottom() 函數的引數中, 含有 Customer 作為維度的表格可提供 |
||
|
Monthnames:
LOAD * INLINE [
Month, Monthnumber
Jan, 1
Feb, 2
Mar, 3
Apr, 4
May, 5
Jun, 6
Jul, 7
Aug, 8
Sep, 9
Oct, 10
Nov, 11
Dec, 12
];
Sales2013:
crosstable (Month, Sales) LOAD * inline [
Customer|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
Astrida|46|60|70|13|78|20|45|65|78|12|78|22
Betacab|65|56|22|79|12|56|45|24|32|78|55|15
Canutility|77|68|34|91|24|68|57|36|44|90|67|27
Divadip|57|36|44|90|67|27|57|68|47|90|80|94
] (delimiter is '|');
若要讓月份按正確的順序排序,則在建立視覺化時,前往屬性面板的 Sorting 區段,選取 Month,然後勾選核取方塊 Sort by expression。在運算式方塊中,寫入 Monthnumber。