cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
petergraham03
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

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
v-yamao-msft
Community Support
Community Support

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.

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?

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.

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

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.

 

 

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

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

Anonymous
Not applicable

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? 

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,059)