反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

Mark max and min by special colors

  • Recent Updates: April 26, 2022
  • 1. Overview

    1.1 Expected effect

    Mark the maximum and minimum values in the table in red and green respectively, as shown in the following figure:

    预期效果.png

    1.2 Implementation ideas

    First calculate the size in the self-service dataset, and use the color granularity in the dashboard to display the color.

    2. Operation steps

    Use data "SALES_Volume" as an example.

    2.1 Data preparation

    Process the "SALES_Volume" table in the self-service dataset.

    1) Add the "sum in group" column, sum the sales volume of each salesperson, and click OK, as shown in the figure below:

    对所属大区的销售额组内求和.png

    2) Add a column "max in group" to count the maximum value of "sum in group" of each salesperson, as shown in the figure below:

    组内最大值.png

    3) Add a column "intra group minimum" to count the minimum value of "intra group summation" in each region, as shown in the figure below:

    组内最小值.png

    4) Update the "SALES_Volume" to see the self-service data set after setting, as shown in the following figure:

    可以看到设置完成的自助数据集.png

    2.2 Set the dashboard

    1) Create a new grouping table component in a dashboard, as shown in the following figure:

    在一个仪表板内新建分组表组件.png

    2) Create a new "flag" field and enter the formula:

    IF(SUM_AGG(${Volume})=AVG_AGG(${max in group}),1,IF(SUM_AGG(${Volume})=AVG_AGG(${min in group}),-1,0))

    click "OK", as shown in the following figure:

    新建flag字段.png

    Formula description:

    FormulaDescription
    IF(SUM_AGG(${Volume})=AVG_AGG(${max in group}),1,IF(SUM_AGG(${Volume})=AVG_AGG(${min in group}),-1,0))If the total sales volume of each salesperson equals to the max of sales volume, then output 1. If the total sales volume of each salesperson equals to the min of sales volume, then output -1, or output 0.

    Note: the aggregate function AVG_AGG() must be used here, because the IF function is used to perform secondary calculation on the aggregate function. When the formula contains non aggregate fields, the formula is illegal.

    3) Drag the "flag" indicator into the "color" under "table properties" → "indicator", and click the setting button next to "color" to add conditions: green when the indicator is - 1 and red when the indicator is 1, as shown in the following figure:

    设置flag颜色.png

    2.3 View the effect

    Click "View all data", and you can see that the maximum value in the component is marked as red and the minimum value is marked as green, as shown in the following figure:

    2.2效果.png

    Note: if you do not click "View all data", the marking effect may not be displayed in the dashboard editing interface. You need to enter the preview interface to view the marking effect.

    Attachment List


    Theme: Build Charts and Analyze data
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭