web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to load pie chart ...
Power Apps
Unanswered

how to load pie chart when the application begins to run

(0) ShareShare
ReportReport
Posted on by 44

I have an app that was created to track task catagories and the time spend on each catagory.  The pie is presneted correctly but it will not load when the app initially runs.  I have to either go to the new record screen and cancel or select the record edit screen then return to the browseGallery screen for the pie to be displayed.  In the onVisible property of the Gallery control a collection is created an agregate column and the pie chart card item property is set to the new agregate column in the collection.  How do I cause the pie to be generated at applicaton load?

 

Ron

Categories:
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi Ron,

     

    If you create a new similar app, will this issue reproduce?

     

    Regards,

    Mona

  • Brian Dang Profile Picture
    3,976 on at

    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.

  • roknron Profile Picture
    44 on at

    That's pretty cool. but, my lables are contained within the datasource and the agregate column that currently is in the contorl item property.  How do I apply this table formula to that situation?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard