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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / create a simple pie chart
Power Apps
Unanswered

create a simple pie chart

(0) ShareShare
ReportReport
Posted on by 392

Hello everybody,

I want to install a pie chart in my app for the first time and don't know how.

I pull the results from my gallery into 3 labels.
Label1 = total number
Label2 = number NOK
Label3 = number of OK

I want to show the ratio of "OK" to "NOK" in a pie chart for "Total", but how?

 

123.PNG

Categories:
I have the same question (0)
  • Verified answer
    wyotim Profile Picture
    2,545 on at

    Hey @Robertjde, to make a pie chart in Power Apps, the easiest way would be to create a collection of the data you want in the chart and then enter that collection name in the Items property of the chart itself. For instance, in your case you would probably want a collection like this:

    // This could go in the OnVisible section of the screen the pie chart is in
    //
    ClearCollect(
     colPieChartData,
     {
     ID: 1, 
     Title: "OK", 
     Amount: *calculation for OK portion*
     },
     {
     ID: 2, 
     Title: "NOK", 
     Amount: *calculation for NOK portion*
     }
    )
    

     

    The calculations in the Amount fields of the collection could be whatever formula you have in the labels you mentioned. Depending on how you have the labels set up, you could possibly do this:

    ClearCollect(
     colPieChartData,
     {
     ID: 1, 
     Title: "OK", 
     Amount: Value(Label3.Text)
     },
     {
     ID: 2, 
     Title: "NOK", 
     Amount: Value(Label2.Text)
     }
    )

     

    Next, select the pie chart object and set the Items property to colPieChartData. It will probably set the values correctly but, if not, ensure that the Labels property is set to Title and the Series property is set to Amount. 

     

    Hopefully, that gets you going in the right direction! Let me know if I can explain anything further!

  • Robertjde Profile Picture
    392 on at

    Thank you @wyotim 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard