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
A dashboard is created. For more information, see Create a dashboard.
A dataset is selected and chart fields are configured. For more information, see Configure a chart.
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!
How to configure the global resource plan
You can follow the steps shown in the figure to configure TopN.
Example
Both measures and dimensions support TopN.
Set TopN for a measure.
To view the top three order amounts, perform the following steps:
Log on to the Quick BI console.
Follow the steps shown in the following figure to go to the dashboard editing page.
In the top navigation bar, click Add Chart. Find the icon and create a cross table.
On the Fields tab of the Chart Design page, configure the cross table data.
Click the icon on the right and choose Advanced Computing-> TopN->Top3.
Click Update.
In this case, the cross table sorts the results by order amount and displays the first three data entries.
Set TopN for the dimension.
If you want to view the data of 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.
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.
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.
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.
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.
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.