All Products
Search
Document Center

Quick BI:TopN

Last Updated:Apr 18, 2023

TopN (Quick Filter) is used to filter the results returned from the database according to the value size, which is convenient for users to filter data and quickly select the largest or smallest data records. In data analysis, you can filter by dimension or measure and perform segmentation at different granularities to help you make decisions. This topic describes how to configure TopN.

Prerequisites

Limits

  • The charts that support TopN are:

    • Line /surface chart: line chart, area chart chart, stacked area chart area chart, percentage stacked area chart, combination chart.

    • Bar charts: column chart, stacked column chart, 100% stacked column chart stacked column chart, circular bar chart, leaderboard, bar chart, stacked bar chart, 100% stacked bar chart stacked bar chart, dynamic bar chart, and waterfall chart.

    • Bubble /Scatter Chart: bubble chart, scatter chart, and facet scatter chart.

    • Table type chart: cross table.

    • Pie /ring charts: pie charts, polar area chart charts, radar charts, and rectangle hierarchy chart.

    • Geography charts: colored map, geo bubble chart, heat map, flying line map, and symbol map.

    • Indicator charts: kanban and indicator trend charts.

    • Funnel /conversion relationship charts: funnel chart and comparison funnel chart.

    • Other charts: word cloud.

  • This analysis method is calculated based on the returned result set. Currently, the upper limit of the public cloud is 10000. If the total amount of data returned exceeds 10000, the calculation result may not meet expectations. Please pay attention!

Entry point

You can follow the steps shown in the figure to configure TopN. image

Example

Both measures and dimensions support TopN.

  • Set TopN for a measure.

    To view the top three order amounts, perform the following steps:

    1. Log on to the Quick BI Console

    2. Follow the steps shown in the following figure to go to the dashboard editing page. image

    3. In the top navigation bar, click Add Chart. Find the imageicon and create a cross table.

    4. On the Fields tab of the Chart Design page, configure the cross table data.

    5. Click the imageicon on the right and choose Advanced Computing-> TopN->Top3.

      image
    6. Click Update.

      In this case, the cross table sorts the results by order amount and displays the first three data entries.

      image
  • Set TopN for the dimension.

    If you want to view the data in the top three regions by order amount, set the Advanced Computing-> TopN->Top3 parameter in the top three regions. Then, the top three regions such as Northeast China, North China, and South China are displayed.

    1高级
  • Customize TopN

    TopN retains the first N bits of data. For example, if you select Top5, the first five bits of data are retained. You can also customize the mode and number of N bits of TopN. image

    • Head (in descending order), that is, the first N pieces of data are taken from the largest to the smallest.

    • Tail (ascending order), that is, the first N pieces of data are taken from small to large.

      The default mode is Head (Descending).

  • TopN special computing and processing methods

    • Totals and Subtotals

      Totals and subtotals do not participate in fast filtering and cannot coexist with TopN. That is, if TopN is selected, totals and subtotals are automatically invalid.

      p548073
    • Row-column Mixed Cloth Treatment

      In the case of mixed rows and columns, the filter is based on the dimension value in the first column by default. For example, in the following example, the filter is based on the order amount in the northeast.

      p548085
    • Handling of null values

      A null value is considered to be the smallest value in TopN. That is, if there are 10 data records, set the head (descending order) Top5,null will be filtered out, and set the tail (ascending order) Top5,null values will be retained.

    • Processing of multiple TopNs

      Multiple TopN settings cannot take effect at the same time. The following TopN settings replace the previous TopN settings.

      p548096
    • Processing of multiple advanced calculations

      Only one advanced calculation can be set for a metric. For example, if TopN is set, the previously set ranking will be replaced.