Dynamic ranking

  • Last update:  2021-04-09
  • I. Overview

    1. Expected effect

    Under normal circumstances, rankings are achieved through ranking and ranking within the group.

    But sometimes, users need to realize: In the reporting mode, when the ranking status function of a certain column value is "dynamically changed" according to the difference of the input value, the above method cannot be satisfied. The expected effect is as follows:

    1.gif


    2. Realization idea

    The transformation is achieved through the built-in rank() function of the report.

    RANK(number,ref,order): Returns the rank of a number in an array. (If you sort this array, the rank of the number is its serial number in the array.)

    Parameter Description:

    number: the number of the required rank (it can be Boolean, true=1, false=0)

    ref: It can be an array, a reference, or a series of numbers. The value of a non-real number is ignored. (Boolean type is accepted, true=1, false=0)

    order: specify the parameter for rank, non-zero means ascending order, zero means descending order

    II. Example

    1. Prepare data

    Create a new normal report, create a new built-in dataset, and add two new fields: "Name" and "Score", and the types are "String" and "Integer" respectively. As shown below:

    2.png


    2. Design report

    Drag the field into the corresponding cell, and the design table is as shown in the figure below:

    3.png

    1) Add a number widget to cell C2

    2) Enter the formula in cell D2: B2+C2

    3) Enter the formula in cell E2: rank(D2, D2[!0], 0), where D2[!0] represents all cells expanded by D2

    Note: Among them, B2 and C2 need to be in digital format by default to achieve ranking. If B2 and C2 cells are in other formats, the following picture will appear:

    4.png

    At this time, enter the formula sum(B2+C2) in cell D2 to solve the problem of garbled ranking.


    3. Save and preview

    Save the template, click "Data Entry Preview", the effect is consistent with the expected effect in section I.1.

    Note: Both App and H5 are supported.

    III. Completed template

    Refer to the completed template:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\Dynamic_ranking.cpt

    Click to download: 

    Dynamic_ranking.cpt


    Attachment List


    Theme: Report Features
    • 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