web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using Choice Column in...
Power Apps
Answered

Using Choice Column in PieCharts

(0) ShareShare
ReportReport
Posted on by

I have an SP list called hazards and a choice column called Cause. Inside the choice column I have examples called Slips, Trips, Falls etc. I'd like to create a PieChart in my PowerApp to count how many of each cause I have in my SP list.

 

I have now idea where to start but during my search I came accross the GroupBy and AddColumns formula.

 

This is what I have so far

 

GroupBy(AddColumns(Hazards,"Causes",Cause.Value),"Cause","GroupData"),"CountByCause",CountRows(GroupData))

 

Can someone point me in the right direction please

 

Thanks 🙂

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Anonymous ,

    Do you want to display the count of each cause from your SP List within the Pie Chart control?

     

    Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

    Set the Items property of the Pie Chart control to following:

    AddColumns(
    GroupBy(
    AddColumns(
    Hazards,
    "CauseValue",
    Cause.Value
    ),
    "CauseValue",
    "GroupData"
    ),
    "Count",
    CountRows(GroupData)
    )

    then within Pie Chart control, set the Labels property to CauseValue column, Series property to Count column.

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    on at

    Fantastic thank you. This worked perfectly.

     

    One more cheeky question if I may. Can I filter by date picker. I have a column in the SP list called "Date Raised". I'd like to add a date picker on ther Pie Chart Screen. Then the user can select a date and the pie chart will show all SP rows added since that date and display the cause pie chart accordingly.

     

    Hope that makes sence. 

     

    Thanks again

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard