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 / best way to make a col...
Power Apps
Unanswered

best way to make a column chart based on a grouped value

(0) ShareShare
ReportReport
Posted on by

hi, i have a sharepoint list with 2 columns, courseID and userID.

I want to make a column chart showing the courses with most users... so a chart showing a line for each course, that has the value of the count of userID... how to do that? 

Categories:
  • Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at

    @Antonioclk 

     

    Can you specify what are the type for ColumnID and userID? Text or Number?

    It's better if you can share some sample data of the ColumnID and userID column data

     

    Thanks,

    Srini

  • Antonioclk Profile Picture
    on at

    sure, here is a sample

    TitleuserIDcourseID
    UserAttendsCourse11
    UserAttendsCourse21
    UserAttendsCourse12
    UserAttendsCourse42
    UserAttendsCourse13
    UserAttendsCourse24
    UserAttendsCourse134
    UserAttendsCourse24

     

    and theren i have a table Courses

    TitlecourseIDName
    Course1Course Sample 1
    Course2Excel 
    Course3Sharepoint
    Course4Word

     

     

    i would love to have a column chart, showing the 5 courses with the most partecipants. Each column should be a course (showing its name) and should be tall as the number of partecipants

  • Antonioclk Profile Picture
    on at

    i tried this way but it's not working... i placed this code in the onVisible of the screen

    ClearCollect(
     mostFollowedCourses,AddColumns(
     GroupBy(
     usersGoestoCoursesTable,
     "courseID",
     "partecipants"
     ),
     "usersCount",
     CountRows(partecipants)
    ))

     

    and in my chart Items i have this

    FirstN(SortByColumns(mostFollowedCourses, "usersCount",SortOrder.Descending),5)

     

    it actually shows me the correct chart. but i cannot find out how to show the correct legend. 
    the legend should show me the name of the courses...



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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard