反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

RANK_ANLS

  • Recent Updates: May 10, 2022
  • 1. Overview

    1.1 Version

    FineBI VersionJAR PackageFunction Changes
    5.1--
    5.1.72020-11-05Function definition optimization & specifies the validity of function parameters.

    1.2 Expected effect

    Rank the profits of last year, for example, according to the "Last year profits" of each province in ascending order from small to large, as shown in the following figure:25.png

    1.3 Implementation ideas

    Use the RANK_ANLS function.

    2. Concept

    Grammarrank_anls(x_agg(array), range, order)Calculate the inter-row ranking of the indicator based on the added fields on the horizontal and vertical axis or row and column dimensions.
    Parameter1x_agg(array)

    The first parameter is the indicator calculated by the user, which must be an aggregate function or aggregate indicator.

    Parameter2rangeThe second parameter range is the calculation range set by the user, 0 is to rank all rows, and 1 is to rank all rows in the group.
    Parameter3orderThe third parameter order is the ranking calculation rule, "asc" is the ascending ranking, and "desc" is the descending ranking.

    Note: The third parameter supports "DESC" and "ASC", and is not case sensitive.

    3. Example

    rank_anls(sum_agg(amount),0,"asc"): If the user drags the "province" on the horizontal axis, the calculation result of this indicator is that the sales are grouped and summarized according to the province, and then the ranking based on last year profits of each province is calculated in the ascending order among all provinces.

    Sample data: "package>FRDemo_MAPDemo".

    3.1 Calculate the ranking of regional profits

    Add a new calculation indicator, named as "rankiing" field, and enter the formula:RANK_ANLS(SUM_AGG(AMOUNT),0,"asc"), as shown in the figure below:

    26.png

    For function writing, see Function calculation format.

    Drag "province", "Last year profits" and "ranking" into the analysis area, and set the "Last year profits" in ascending order, as shown in the figure below:

    27.png

    3.2 Effect view

    See section 1.2 of this article for details.

    Attachment List


    Theme: Advanced Data Analyis
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭