Overview
Preview
This document introduces how to calculate the proportions of the top few indicators and combine the rest indicators into another category.
For example, you may need to calculate the sales proportions of the top five stores by sales and the proportion of the total sales of other stores, as shown in the following figure.
Implementation Method
Classify stores whose sales rank sixth or below as Others.
Procedures
Sample data: Store Sales Statistics.xlsx
Download the sample data Store Sales Statistics.
Data Preparation
1. Create an analysis subject and upload the sample data Store Sales Statistics.
2. Click Group Summary, drag Store Name (summary method: Group Records with Same Value) into Group, and drag Sales (summary method: Sum) into Total.
3. Add a Summary Column named Ranking and set the Summary Method to Descend.
4. Add a Formula Column named Grouping. Enter the formula IF(Ranking<=5,Store Name,"Others") to combine stores whose sales rank sixth or below into another category named Others.
5. Click OK and the result is shown in the following figure.
6. Click Save and Update.
Adding a Component
1. Click to create a component, set the chart type to Pie Chart, and drag Grouping into Color, and Sales into Angle and Label.
2. Set the Quick Calculate type of Sales to Percentage.
3. Choose > Value Format of Sales and select Percentage in the pop-up box.
Demonstration
The result is shown in the following figure, which showcases the sales proportions of the top five stores by sales and the proportion of other stores' total sales.