Syntax
WINDOW_MAX(Indicator,[Grouping field 1,Grouping field 2,...],[Sorting field 1,Sorting method,Sorting field 2,Sorting method,...],[Window upper limit,Window lower limit])
This function is used to return the maximum of the window expression.
WINDOW functions perform calculations based on the analysis views. In WINDOW functions, indicators, grouping fields, and sorting fields must all be of an aggregate nature, and dimension fields must all come from the analysis view.
Parameter 1
Indicator
The value cannot be empty.
Parameter 2
Grouping field
If the default value is used, data is not grouped by any field.
Parameter 3
Sorting field
If the default value is used, data is calculated in the default order.
Parameter 4
Sorting method
The value can be asc (ascending order) or desc (descending order).
If one sorting method is defaulted, all sorting methods need to be defaulted. In this case, data is sorted by the sorting field in the ascending order.
The value can be "first" (first row in the group) or "last" (last row in the group).
Numeric constants are supported.
0 represents the current row.
-n represents the n row(s) before the current row.
n represents the n row(s) after the current row.
If the default value is used, data from the first row to the last row in the group is calculated (["first","last"]).
For details, see WINDOW Function Overview - Notes.
WINDOW_MAX(SUM_AGG(Sales),[City],[SUM_AGG(Sales)],[-2,0])
The maximum sales of three consecutive rows in the City group are calculated.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy