Limitation: When you set the Items property of a Pie Chart to a Collection, you will have to add data into the Collection before anything shows up. Also, if you want to change any data to the Pie Chart, that requires you to recollect it to reflect changes.
As an alternative, the Table() function is perfect for the Items property of the Pie Chart because it show real-time data. You do not need to recollect data. It's probably the most underrated function in PowerApps since connected datasources are emphasized so much.
Below is an example of a formula used to summarize the level of proficiency of students as a whole:
Table(
{label: "Advanced", num: CountRows(Filter(datasource,Score>=90))},
{label: "Proficient", num: CountRows(Filter(datasource,Score<90 && Score>=80))},
{label: "Basic", num: CountRows(Filter(datasource,Score<80 && Score>=70))},
{label: "Below", num: CountRows(Filter(datasource,Score<70))}
)Each record in a table is wrapped between curly brackets {}. Each record is separated by a comma. Within each record, each column includes its name, a colon, and its value.
The pie chart above expects 4 slices. The slices are named by the "label" column. The size of each slice is set to the "num" column. Rename things to your needs.
If I add or remove any records from datasource, the changes will be immediately reflected in the Pie Chart since Table() is dynamic.