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.
Solved! Go to Solution.
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.
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
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
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.
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.
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
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).
User | Count |
---|---|
161 | |
86 | |
71 | |
64 | |
62 |
User | Count |
---|---|
208 | |
148 | |
95 | |
84 | |
66 |