Highlighting Max and Min Values

  • Last update:June 03, 2025
  • Overview

    Application Scenario

    When comparing data within the same dimension, you may want to highlight the maximum and minimum values.

    For example, you want to highlight the highest and lowest sales volumes of each salesperson, as shown in the following figure.

     1.png

    Implementation Method

    You can add Background attributes in Condition Attribute to achieve the effect. Two ways are available for calculating the maximum and minimum values:

    1. You can select Summary and Max/Min in Data Setting.

    2. You can use the formula MAX() or MIN().

    Template Preparation

    Template Creation

    Create a general report, as shown in the following figure.

     2.png

    Data Preparation

    Create a database query ds1 with the SQL query statement SELECT * FROM Sales_Volume, as shown in the following figure.

     3.png

    Report Design

    1. Merge cells A1 to C1 and enter the title texts, and merge cells A2 and A3, cells B2 and B3 and then enter the header texts. Drag the corresponding data columns into cells A4, B4, C2, C3, and C4, as shown in the following figure.

     4.png

    2. Set Expansion Direction to Vertical for cells C2 and C3, as shown in the following figure.

     5.png

    3. Set Expansion Direction to No Expansion for the cell C4.

     6.png

    Method One

    Setting the Maximum and Minimum Values

    1. Drag the data column Sales_Volume into cells D4 and E4, select Summary and Max in Data Setting for cell D4, and select Summary and Min in Data Setting for cell E4. For example, the following figure shows the steps of setting cell D4.

     7.png

    2. Hide the column D and column E, as shown in the following figure.

     8.png

    Condition Attribute Setting

    1. Select cell C3, select Condition Attribute, and add a common condition: Equal to Cell D4, and select Background from the Attribute drop-down list. Select green as the background color for Current Cell, which means that the cell with the maximum sales value will be filled with green, as shown in the following figure.

     9.png

    2. Select cell C3, select Condition Attribute, and add a common condition: Equal to Cell E4, and select Background from the Attribute drop-down list. Select orange as the background color for Current Cell, which means that the cell with the minimum sales value will be filled with orange, as shown in the following figure.

     10.png

    Method Two

    1. Select cell C3, select Condition Attribute, and add a formula condition: C4 = MAX(C4[!0]{B4 = $B4}), which calculates the maximum value expanded from cell C4 associated with the current salesperson. Select Background from the Attribute drop-down list, and select green as the background color for Current Cell, which means that the cell with the maximum sales value will be filled with green, as shown in the following figure.

     11.png

    2. Select cell C3, select Condition Attribute, and add a formula condition: C4 = MIN(C4[!0]{B4 = $B4}), which calculates the maximum value expanded from cell C4 associated with the current salesperson. Select Background from the Attribute drop-down list, and select orange as the background color for Current Cell, which means that the cell with the minimum sales value will be filled with orange, as shown in the following figure.

     12.png

    Effect Display

    Method one and method two show the same effect.

    1. PC

    Save and preview the report, as shown in the following figure.

     13.png

    2. Mobile terminal

    The report can be previewed on the DataAnalyst APP and HTML5 terminal, as shown in the following figure.

     14.jpg

    Template Download

    Attachment List


    Theme: Report Features
    Already the First
    Already the Last
    • 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