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 / Populate PowerApps Cha...
Power Apps
Answered

Populate PowerApps Chart with gallery items count and label according to Item Icon colors.

(0) ShareShare
ReportReport
Posted on by 492

Hi

 

I have a gallery with items and a circle Icon to indicate the status based on the end date in the SP list.

 

The chart should reflect the count of three green icons and one yellow-green icon, for example.

 

NC12_0-1705325824000.png

 

Categories:
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @NC12 ,

     

    Could you explain what is the logic for different icon colors?

     

    Best Regards,

    Wearsky

  • Verified answer
    NN-21081740-0 Profile Picture
    492 on at

    Hi

     

    Here is the logic: 

    If(DateDiff(ThisItem.'Projected End Date',Today())<=0, Color.Green, If(DateDiff(ThisItem.'Projected End Date',Today())=1,Color.YellowGreen, If(DateDiff(ThisItem.'Projected End Date',Today())=5,Color.Yellow, If(DateDiff(ThisItem.'Projected End Date',Today())=10,Color.Red))))
     
    If the projected project end date is breached by one day, green changes to YellowGreen, after 4 days it becomes yellow and then on the 10th day it's Red.
     
    So, on the chart, I want to see how many greens, yellowgreen and red.
     
    Thanks
     
     
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @NC12 ,

     

    Please try this in items property of chart control.

    [
    {Name:"Green",Count:CountRows(Filter(<db>,DateDiff('Projected End Date',Today())<=0))},
    {Name:"YellowGreen",Count:CountRows(Filter(<db>,DateDiff('Projected End Date',Today())=1))},
    {Name:"Yellow",Count:CountRows(Filter(<db>,DateDiff('Projected End Date',Today())=5))},
    {Name:"Red",Count:CountRows(Filter(<db>,DateDiff('Projected End Date',Today())=10))}
    ]

     

    Best Regards,

    Wearsky

  • NN-21081740-0 Profile Picture
    492 on at

    Hi

     

    Oh my word, it worked!!!!!!

    NC12_0-1705404747383.png

    NC12_0-1705405605757.png

     

     

    Thank you a million times!!!🤗

     

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard