cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Pie Chart Beginner

Hi

 

I want to display a pie chart linking to a SP list on my Portal and I'm completely confused how to go about it.

 

I want it to point at a SP list which has a choice field called 'Status'. The choice field has six options and I want the pie chart to show how many items are New, Cancelled, Ready etc. So far I've found the guides to do this baffling. How do I point the pie Chart at the list and the field and what properties do I use? Any help appreciated.

PieChart.png

3 REPLIES 3
Super User III
Super User III

@darrenfloyd666 
First step is to create a new collection that groups together the data counted in a new collection called myTempData

 

ClearCollect(
    myTempData,
    AddColumns(your_datasource_name, "myStatus", "")
);

UpdateIf(myTempData, true, {myStatus=Status.Value});

ClearCollect(
    myChartData,
    DropColumns(
        AddColumns(
            GroupBy(your_datasource_name, "myStatus", "GroupedItems"),
        "Count Value",CountRows(GroupedItems)
        ),
    "GroupedItems"
    )
);

 

Then use the collection in Items property in your chart.

myTempData

 

Let me know if you need additional directions for using this in the chart.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thanks @mdevaney I'll give that a go and get back to you! 

Morning @mdevaney I'm coming round to this again. I created a new Collection by clicking on Action on the ribbon and then Collect then on the drop down I've got Collection1 and the second drop down PieChart1.Selected. I can see it in my Data sources but can't seem to edit it? Can't find a straight answer to what's happening?

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (4,504)