反馈已提交
网络繁忙
This document introduces how to calculate the horizontal proportion of cross tables.
You may need to calculate the sales proportion of each product category in each province. For example, in Shanghai, the sales of fresh food accounts for 7.06% of the total.
Calculate the total sales of each province and the provincial sales of each product category through the DEF function.
The formula is as follows: Proportion = Provincial sales of each product category / Provincial sales.
Sample data: Group Sales Table.xlsx
Create an analysis subject and upload the sample data Group Sales Table.
1. Go to the component editing page and select the chart type as Cross Table. Drag the Province field into Row Dimension and the Product Category field into Column Dimension.
2. Calculate the total sales of each province. Add a calculation indicator and enter the formula shown in the following figure.
SUM_AGG(Sales)
Sums up the total sales amount.
SUM_AGG
DEF(SUM_AGG(Sales Amount),[Province])
Groups data by province and sums up the sales amount of each group to calculate the total sales of each province.
DEF (Specified Dimension)
3. Calculate the provincial sales amount of each product category. Add a calculation indicator and enter the formula shown in the following figure.
DEF(SUM_AGG(Sales Amount),[Province,Product Category])
Groups data by province and product category and sums up the sales amount of each group to calculate the provincial sales of each product category.
4. Calculate the proportion. Add a calculation indicator and enter the formula shown in the following figure.
5. Drag the Proportion of the Sales Amount of Each Product Category field into the analysis area and change the Value Format to Percentage.
See section "Preview."
フィードバック
鼠标选中内容,快速反馈问题
鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。
不再提示
10s后关闭