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

petergraham03
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.

 

 

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

petergraham03
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

jsamp99
Regular Visitor

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
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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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