cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
petergraham03
Level: Powered On

PieChart from SharePoint List

Is it possible to produce a pie chart based on data that comes from a SharePoint list?

 

For example;  SharePoint List has multiple columns, however one column could be used to group similiar entries and another column has some value that can be summed.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff rgruian
Power Apps Staff

Re: PieChart from SharePoint List

Hi Peter,

 

What is the schema of your SharePoint list? (the column names, types)

And which column(s) do you want summarized?

 

Here's how to summarize, assuming you have a table with two columns, Age and Income, grouping by Age and summing the Income per group:

 

    = AddColumns(GroupBy(People, "Age", "Group"), "IncomeTotal", Sum(Group, Income))

 

This will produce a column "IncomeTotal" that summarizes the Incomes by Age.

 

Please feel free to adapt this to your scenario as needed.

 

I hope this helps.

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

9 REPLIES 9
Community Support Team
Community Support Team

Re: PieChart from SharePoint List

Hi Petergraham03,

 

I had a SharePoint Online list with two columns, one was the Name and another one was the Number. In my App, I connected data source to the SharePoint list, then added a Pie Chart control and set the Item property of the Pie chart to the data source. It worked for me.

 

This article about Pie chart control in PowerApps can be a reference for you. The link of the article is:
https://powerapps.microsoft.com/en-us/tutorials/control-pie-chart/

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
petergraham03
Level: Powered On

Re: PieChart from SharePoint List

Thanks - I agree, two columns works, but if you have a list with more than two, how do you tell the piechart what items you want to graph?
Community Support Team
Community Support Team

Re: PieChart from SharePoint List

Hi Petergraham03,

 

If you have a list with more than two columns, when you create a Pie chart to show the item you want, you could set the Items Property of the Pie chart to: Data Source.Column Name.

 

Please try if this works for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
petergraham03
Level: Powered On

Re: PieChart from SharePoint List

Thank-you for the reply.  Finally got around to trying that, but it still does not work.

 

If I select a column from the SharePoint list, it doesn't seem to consilidate the entries and simply counts them.

 

I've attached a screenshot.

 

screenshot01.jpg

petergraham03
Level: Powered On

Re: PieChart from SharePoint List

Found if I add a GroupBy function then I get the consolidation of that column, but not sure how to get it to sum the numbers related to that column.

 

 

Power Apps Staff rgruian
Power Apps Staff

Re: PieChart from SharePoint List

Hi Peter,

 

What is the schema of your SharePoint list? (the column names, types)

And which column(s) do you want summarized?

 

Here's how to summarize, assuming you have a table with two columns, Age and Income, grouping by Age and summing the Income per group:

 

    = AddColumns(GroupBy(People, "Age", "Group"), "IncomeTotal", Sum(Group, Income))

 

This will produce a column "IncomeTotal" that summarizes the Incomes by Age.

 

Please feel free to adapt this to your scenario as needed.

 

I hope this helps.

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

petergraham03
Level: Powered On

Re: PieChart from SharePoint List

Hi,

 

My list consists of multiple text columns including the field I wish to group by which is a simple list of choices (ex Hardware, Software, etc).  Then one last column is a number that has the cost/price of the item.

 

My goal is to create a pie chart grouping the different choices and summing the cost/price.

 

I will see what I can do with your suggestion.

 

Thanks

Highlighted
jsamp99
Level: Powered On

Re: PieChart from SharePoint List

Hi,

 

I have a sharepoint list that includes true/false values like responses to a survey. I would like to display the results in a pie chart, but when I use the guidance above the "FALSE" values always sum to zero. What function can be used to get the number of true/false? 

Power Apps Staff CarlosFigueira
Power Apps Staff

Re: PieChart from SharePoint List

If you want to find the number of items in each of the groups, you can use the CountRows function (instead of Sum, as in the previous example).

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,481)