Skip to main content

How do I use pie charts to display reports based on age ranges?


1. Usage scenarios

When a shopping mall counts the age distribution of members, the age of members is displayed through pie chart. As shown in the figure, due to the large age and different users, therefore, we hope that the age categories in the table can be displayed. For example, there are data from 20 to 50 years old in the table. Now we need to classify and summarize the data according to the age, respectively:

    1. 20 to 30 years old is a category
    2. 30 to 40 years old is a category
    3. 40 to 50 years old is a category


2. Video Display

此处为语雀视频卡片,点击链接查看:饼状图根据年龄段划分计数.mp4


3. Procedure

3.1 drag the pie chart to the page to configure the dataset

Add components and configure datasets

3.2 configure the dimension as a formula and use casewhen to judge the classification. Divide the age into three categories: under 30 years old, 30-40 years old, and over 40 years old.

The formula is as follows:

Set formula

3.3 After the dimension is configured, configure the measure as the instance id, set it to count, and then save and view it.

The effect is as follows:

4. Try it online

https://www.aliwork.com/bench/coe? tplUuid=TPL_YD25IO77INF2EJ1E2OBM


-------------------- Get the latest information YIDA, welcome to follow US--------------------

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4