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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Pie chart color not sh...
Power Apps
Unanswered

Pie chart color not showing for choice column

(0) ShareShare
ReportReport
Posted on by 522

I have pie chart which does not show the color properly where it uses choices column. It shows different than the one which is below.

 

ForAll(AddColumns(GroupBy(Task,Task.value, "Label"),"Count", CountRows(Label)),
 Switch(
 Task.value,
 "At Risk", Color.Yellow,
 "Complete", Color.DarkBlue,
 "On Track", Color.Green,
 "Not On Track",Color.Red,
 "Not Yet Started",Color.Gray
 )
)

 

 

Categories:
  • developerAJ Profile Picture
    4,763 on at

    @Nikhil2 

     

    Try this out

    SortByColumns( AddColumns(GroupBy(AddColumns( Task,"TaskValue",Task.value),"TaskValue", "Label"),"Count", CountRows(Label)),"TaskValue",SortOrder.Descending)
    
    use this as items property of pie chart

    color set:[Color.Yellow,Color.DarkBlue, Color.Green,Color.Red,Color.Gray]

     

    Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    You can connect with me on LinkedIn

  • Nikhil2 Profile Picture
    522 on at

    @developerAJ For the items property of the pie chart is working fine, but I want to make itemcolor set . I want make them switch dynamically.

    ForAll(AddColumns(GroupBy(Task,Task.value, "Label"),"Count", CountRows(Label)),
     Switch(
     Task.value,
     "At Risk", Color.Yellow,
     "Complete", Color.DarkBlue,
     "On Track", Color.Green,
     "Not On Track",Color.Red,
     "Not Yet Started",Color.Gray
     )
    )

     

  • developerAJ Profile Picture
    4,763 on at

    try the code i gave below

    check the output it will be same as you want

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard