RANK_ANLS

  • Last update:  2023-05-15
  • 1. Overview

    1.1 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.2 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.

    附件列表


    主题: Advanced Data Analyis
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy