cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Power Apps
Power Apps

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
Highlighted
Community Support
Community Support

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.
Highlighted
Frequent Visitor

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?
Highlighted
Community Support
Community Support

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.
Highlighted
Frequent Visitor

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

Frequent Visitor

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.

 

 

Highlighted
Power Apps
Power Apps

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

Highlighted
Frequent Visitor

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
Anonymous
Not applicable

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? 

Highlighted
Power Apps
Power Apps

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,883)