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 / Charts with filter, ha...
Power Apps
Answered

Charts with filter, having trouble with collection used while using a dropdown onchange property

(0) ShareShare
ReportReport
Posted on by 822 Super User 2025 Season 2

Hello everyone,

My goal is to have a simple column chart that has filters.

I was able to do the first requirement which was to count all the Open and Closed status using this formulas below.

On the onchange property of my dropdown when its equals to All Requests.

 

 

If(
 //condition
 drpFilter_1.Selected.Category = "All Requests",
 //true---------------------------------------
 //Collect list via requeststatus
 ClearCollect(
 colRequestStatus,
 ForAll(
 Distinct(
 'Enquiries Improvement Request',
 RequestStatus.Value
 ),
 {Result: ThisRecord.Value}
 )
 );
 //Collect all request count
 ClearCollect(
 colRequestCount,
 AddColumns(
 colRequestStatus,
 "Count",
 CountRows(
 Filter(
 'Enquiries Improvement Request',
 RequestStatus.Value = colRequestStatus[@Result]
 )
 )
 )
 );Set(timerStart,true);,
 //false---------------------------------------

 
 Set(timerStart,true);
)

 

 

 items property of the chart:

colRequestCount



Now my problem is that I do not know what to do when other categories are selected in the dropdown. Ive tried several attempts to this however to no success I am stuck. I want to be able to present only the Open and Closed Request status of the selected category in the dropdown.


Categories:
I have the same question (0)
  • KevinGador Profile Picture
    822 Super User 2025 Season 2 on at

    no worries managed to get it working by renaming the column from ReqVal to Result

    kej_0-1711430442829.png

     

  • WarrenBelz Profile Picture
    153,508 Most Valuable Professional on at

    Hi @kej ,

    I was focussed on getting your filter working, which seems to have worked.  You might have a look at which field you have in the Labels drop-down in Advanced in the right panel. I do not use charts much, so may not be a lot of help here.

     

    Please click Accept as solution 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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • KevinGador Profile Picture
    822 Super User 2025 Season 2 on at

    it worked! However when I change it the labels are also changed for example when all request.
    I also changed the name of the collection to colRequestCount since its the item property of my chart.

    kej_0-1711422882800.png

    but then when i change the dropdown

    kej_1-1711422911866.png

     



  • Verified answer
    WarrenBelz Profile Picture
    153,508 Most Valuable Professional on at

    Hi @kej ,

    Assuming Category is a Text column, try this

    ClearCollect(
     colRequestStatus,
     AddColumns(
     GroupBy(
     AddColumns(
     Filter(
     'Enquiries Improvement Request',
     drpFilter_1.Selected.Category = "All Requests" ||
     Category = drpFilter_1.Selected.Category
     ),
     "ReqVal",
     RequestStatus.Value
     ),
     "ReqVal",
     "Grouped"
     ),
     "Count",
     CountRows(Grouped)
     )
    )

     

    Please click Accept as solution 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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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
Kalathiya Profile Picture

Kalathiya 427

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 336 Super User 2025 Season 2

Last 30 days Overall leaderboard