Highlighting Duplicate Values in a Column

  • Last update:June 03, 2025
  • Overview

    Expected Effect

    When designing a report, you may need to check whether duplicate values exist in the same column. If so, these values need to be highlighted, as shown in the following figure.

     1.png

    Implementation Method

    You can use the Conditional Summary function to judge whether the number of occurrences of each cell value in this column is greater than 1.

    You can add the Background attributes in Condition Attribute to set the highlighted background color.

    Example

    Data Preparation

    Create a general report, and create a built-in dataset named Embedded1, as shown in the following figure.

     2.png

    Report Design

    1. Design the table as shown in the following figure.

     3.png

    2. Select cell A2, choose Cell Element > Basic on the right attribute panel, and select List from the drop-down list of Data Setting to prevent the same data (if any) in the first column from being grouped and merged.

     4.png

    Condition Attribute Adding

    Select cell B2, select Condition Attribute on the right attribute panel, add a Background attribute, set Formula Condition to Formula, and enter the formula: count(B2[!0]{B2 = $B2}) > 1.

    The following table describes the formula.

    FormulaDescription

    B2[!0]

    All the values expanded from cell B2.

    {B2=$B2}

    The corresponding expanded values from cell B2 as filter conditions.

    count()>1

    The value of the current cell is the condition to count the occurrence number of each value expanded from cell B2, and a count result greater than 1 indicates duplicate data.

    The following figure shows the steps.

     5.png

    Effect Display

    PC

    Save the template and click Pagination Preview. The effect is the same as that shown in section "Expected Effect."

    Mobile Terminal

    The report can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the effect.

     6.jpg

    Template Download

    For details, you can download the templates Highlighting Duplicate Values in a Column.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