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 / query the database to ...
Power Apps
Answered

query the database to generate a column chart

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a Sharepoint list with this format

 

IDEventArgument
1Login 
2Login 
3SearchRome
4SearchParis
5SearchTest

 

I want to make a column chart that will show the top 10 argument searched...

how can I do? I tried to use a with function but it doesn't work

 

 

 

ClearCollect(
 collAnalyticsSearches,
 With(
 { wSearch: Filter(db_Analytics,Event="Search") },
 GroupBy(db_Analytics,"Arguments","countSearches"),
 CountRows(countSearches)
 )
)

 

 

 

what am I doing wrong?

Thank you

Categories:
  • Verified answer
    developerAJ Profile Picture
    4,763 on at

    @Antonioclk 

     

    Clear(collAnalyticsSearche);
    With(
     { wSearch:GroupBy(Filter(db_Analytics,Event="Search"),"Arguments","countSearches") },
     ForAll(wSearch As s, Collect(collAnalyticsSearches, {Name:s.Argumens,count:CountRows(s.countSearches)})
     )
     )

     

    use above formula

     

    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.

  • Antonioclk Profile Picture
    on at

    thanks

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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard