cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
darrenfloyd666
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
mdevaney
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (27,693)