Maximum and minimum highlighting

  • Last update:  2022-01-06
  • I. Overview

    1. Expected effect

    In the process of making reports, when comparing in the same dimension, we hope to highlight the maximum or minimum value. The effect is shown in the following figure:

    1.png


    2. Implementation ideas

    This is achieved by setting Conditional Formatting> Background. There are two ways to judge the "maximum" and "minimum":

    1) By setting Data Setting>Summary>Max/Min.

    2) Use the formula MAX() or MIN().

    II. Example

    1. Prepare data

    Create a new general report, create a new database query ds1: SELECT * FROM SALES_VOLUME.

    2.png


    2. Method 1

    1) The initial style of the design report is shown in the figure below:

    3.png

    Among them, column D and column E are only used as conditions and need to be hidden after setting. Select columns D and E, click the right mouse button at the column number, and select hide, as shown in the figure below:

    4.png

    The specific cell settings are shown in the following table:

    Cell  Dataset

    Data

    Column

    Data

    Setting1

    Data

    Setting2  

    Expansion

    Direction  

    Left

    Parent

    Cell  

    Up

    Parent

    Cell  

    A4  ds1  Region  

    Group  

    Common  Vertical  Default  

    Default

    B4  ds1   Salesperson  Group  Common  Vertical  Default  Default
    C2  ds1   Product_typesGroup  Common  Horizontal  Default  Default
    C3  ds1   Product  GroupCommon  Horizontal  Default  Default
    C4  ds1   Sales_Volume  SummarySum  No Expansion  Default  Default
    D4  ds1   Sales_Volume Summary Max  No Expansion  Default  Default
    E4  ds1   Sales_volume  Summary  Min  No Expansion  Default  Default

    2) Select cell C4, click Conditional Formatting on the right, add two condition formattings, and rename them to Maximum and Minimum.

    When the currentValue is equal to the maximum value D4 cell, the background is displayed in green. As shown below:

    5.png

    When the currentValue is equal to the minimum E4 cell, the background is displayed in yellow. As shown below:

    6.png


    3. Method 2

    When designing a report, instead of using Data Setting>Summary to find the maximum and minimum values, the same effect can be achieved by directly using formulas to determine the maximum and minimum values in the Conditional Formatting.

    Just change the condition type of the above maximum and minimum from Common to Formula.

    The maximum formula is: C4 = MAX(C4[!0]{B4 = $B4}). As shown below:

    7.png

    The minimum formula is: C4 = MIN(C4[!0]{B4 = $B4}). As shown below:

    8.png

    Note: C4[!0] in the formula refers to all values expanded from cell C4, {B4 = $B4} means to filter by the value at the corresponding position of cell B4 after expansion.


    4. Effect preview

    1) PC terminal

    Save the report and click Pagination Preview. The effect is the same as expected in Section I.1.Expected effect.

    2) Mobile terminal

    Both App and HTML5 are supported, and the effect is shown in the figure below:

    7.png

    III. Template download

    The completed template can be found in:

    %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\FeaturesApplication\Maximum and minimum highlighting_Method 1.cpt

    %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\FeaturesApplication\Maximum and minimum highlighting_Method 2.cpt

    Click to download the template:

    Maximum and minimum highlighting_Method 1.cpt

    Maximum and minimum highlighting_Method 2.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