Data ranking

更新时间:
复制 MD 格式

Data ranking assigns a rank to your data based on value, making data points easier to compare. In data analysis, you can rank measures to gain insights and inform decisions. This topic describes how to configure data ranking.

Prerequisites

Limits

  • Ranking calculations are performed on the returned result set, which is limited to 10,000 rows on the public cloud. If a query returns more than 10,000 rows, the ranking results may be inaccurate.

  • The following table lists the chart types that support data ranking.

    Ranking method

    Description

    Supported chart types

    Overall ranking

    Ranks a data point relative to the entire dataset.

    • Line/area charts: Line Chart, Area Chart, Stacked Area Chart, Percentage Stacked Area Chart, and Combo Chart.

    • Column/bar charts: Column Chart, Stacked Column Chart, Percentage Stacked Column Chart, Circular Column Chart, indicator board, Bar Chart, Stacked Bar Chart, Percentage Stacked Bar Chart, Animated Bar Chart, and Waterfall Chart.

    • Bubble/scatter charts: Bubble Chart, Scatter Chart, and Faceted Scatter Chart.

    • Table charts: cross table, detail table, and Heatmap.

    • Pie/ring charts: Pie Chart, Rose Chart, Radar Chart, and Treemap.

    • Geographic charts: Choropleth Map, Bubble Map, Heatmap, Fly Line Map, and Symbol Map.

    • Indicator charts: indicator board and Indicator Trend Chart.

    • Funnel/conversion charts: Funnel Chart and Comparison Funnel Chart.

    • Other charts: Word Cloud.

    Group ranking

    Ranks a data point within its assigned group.

    • Table charts: cross table.

Configuration

On the chart's Data tab, find the measure you want to rank. Click the image icon next to it and select Advanced calculation > Ranking. Then, select a ranking type that meets your business requirements.

image

The following tables describe the available ranking calculation types and ranking methods.

  • Ranking calculation type

    Chart type

    Ranking calculation type

    Restriction

    Calculation logic

    cross table

    Ascending

    /

    Ranks all data points from lowest to highest based on the measure value.

    Descending

    /

    Ranks all data points from highest to lowest based on the measure value.

    Group ascending

    /

    Groups data by the finest granularity and ranks data points from lowest to highest within each group. For example, if you have dimensions for region, province, and city, data is grouped by region and province, and then cities are ranked in ascending order.image

    Group descending

    /

    Groups data by the finest granularity and ranks data points from highest to lowest within each group.

    Custom

    Rank by column

    The Rows area contains at least one dimension field.

    Calculates the rank of a data point within its column.

    Group rank by column

    The Rows area contains two or more dimension fields.

    Calculates the rank of the current data point within its group in a column.

    Grouping logic: All dimensions from the first dimension in the Rows area to the selected grouping dimension form a single group. For example, in the following figure, data is grouped by Region and Province, and ranked by the Province dimension.image

    Rank by row

    The Columns area contains at least one dimension field.

    Calculates the rank of a data point within its row.

    Group rank by row

    The Columns area contains two or more dimension fields.

    Calculates the rank of the current data point within its group in a row.

    Grouping logic: All dimensions from the first dimension in the Columns area to the selected grouping dimension form a single group. For example, in the following figure, data is grouped and ranked by the Transportation Method dimension.image

    Other charts

    Ascending

    /

    Ranks all data points from lowest to highest based on the measure value.

    Descending

    /

    Ranks all data points from highest to lowest based on the measure value.

    Custom

    /

    Allows you to customize the rank order and ranking method.

  • Ranking method: When you select the Custom calculation type, you can configure the Rank order and Ranking method. The ranking method defines how to handle ties (duplicate values). Choose from the following three methods:image

    Ranking method

    Description

    Example

    Ranking

    Duplicate values receive the same rank, and subsequent ranks are skipped.

    1, 2, 2, 4

    Dense rank

    Duplicate values receive the same rank, and ranks are not skipped.

    1, 2, 2, 3

    Sequential rank

    Assigns a unique rank to each value, including duplicates.

    1, 2, 3, 4

Examples

The following examples illustrate how data ranking calculations work.

Example 1: Indicator board

This example shows how to configure ranking for an indicator board.

  1. Log on to the Quick BI console.

  2. Follow the steps in the figure to open the dashboard editor.

    image.png

  3. In the top menu bar, click Add Chart. Find and click indicator board, or drag it to the dashboard canvas.image.png

  4. On the Data tab of the Chart Design pane, configure the indicator board data.

    Double-click or drag the required dimension and measure fields to the target areas.

    • From the Dimensions list, find and drag the Region dimension to the Rows area.

    • From the Measures list, find the Order Amount and drag it to the Columns area twice.

      Note

      One of the two Order Amount fields in the Columns area displays the original data, and the other is used for the ranking calculation.

      When you add a duplicate field to the Measures area, a "Duplicate measures exist" message appears. You can ignore this message and update the chart after completing the configuration.

  1. Click the image icon next to the second Order Amount field and select Advanced calculation > Ranking. The following examples show the results for different ranking methods.image

    Ranking calculation type

    Description

    Example result

    Ascending

    Ranks all data from lowest to highest. The highest order amount is ranked last. In this example, the Southwest region has the highest order amount and is ranked No. 7.

    image

    Descending

    Ranks all data from highest to lowest. The highest order amount is ranked first. In this example, the Southwest region has the highest order amount and is ranked No. 1.

    image

    Custom

    In this example, the order is set to descending.

    Ranking

    Duplicate values receive the same rank, and subsequent ranks are skipped. In this example, the Northeast and East China regions have the same order amount and are both ranked No. 4. Rank No. 5 is skipped, and the next rank is No. 6.

    image

    Dense rank

    Duplicate values receive the same rank, and ranks are not skipped. In this example, the Northeast and East China regions have the same order amount and are both ranked No. 4. The next rank is No. 5.

    image

    Sequential rank

    Duplicate values receive different ranks. In this example, the Northeast and East China regions have the same order amount, but they are ranked differently as No. 4 and No. 5.

    image

Example 2: Cross table

The ranking calculation types for a cross table differ from those for other charts. The following examples illustrate these differences.

Ranking calculation type

Configuration

Example result

Ascending

Ranks all data from lowest to highest. The highest order amount is ranked last. In this example, the South China region has the highest order amount and is ranked No. 7.

image

Descending

Ranks all data from highest to lowest. The highest order amount is ranked first. In this example, the South China region has the highest order amount and is ranked No. 1.

image

Group ascending

In this example, provinces are grouped by region, and the order amount is ranked from lowest to highest within each region. For example, in the Northeast region, Heilongjiang province has the lowest order amount and is ranked No. 1.

image

Group descending

In this example, provinces are grouped by region, and the order amount is ranked from highest to lowest within each region. For example, in the Northeast region, Heilongjiang province has the lowest order amount and is ranked No. 3.

image

Custom

This example uses descending order and the Ranking method.

Rank by column

In this example, all data is ranked in descending order by column. For example, for the "Large truck" transportation method, South China has the highest order amount and is ranked No. 1.

image

Group rank by column

In this example, the first dimension and the grouping dimension in the Rows area are both region. Therefore, data is grouped by the region dimension and ranked in descending order. For example, in the Northeast region, Heilongjiang has the lowest order amount for the "Large truck" transportation method and is ranked No. 3.

image

Rank by row

In this example, all data is ranked in descending order by row. For example, in Jilin province, the "Train" transportation method has the highest order amount and is ranked No. 1.

image

Group rank by row

In this example, the first dimension and the grouping dimension in the Columns area are both product type. Therefore, data is grouped by the product type dimension and ranked in descending order. For example, among the office supply orders in Jilin province, the "Train" transportation method has the highest order amount and is ranked No. 1.

image