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 / Find highest value mar...
Power Apps
Unanswered

Find highest value marks in a student record

(0) ShareShare
ReportReport
Posted on by 71

I want to find in which subject student got highest marks.

I have student table with multiple student records. Each student record includes marks obtained by a student in various subjects.

I want to find the highest marks obtained by a student by comparing marks of various subject in an individual record and show the subject name in which student got highest marks.

I want to select student name from Gallery and want to show respective student’s highest marks obtained in subject along with subject name.
Screenshot of student records table is attached.
Table name: Student_Records

BradAugustene_0-1696391866856.png

 

Example:

When user select Student A from Vertical Gallery, then text label on right hand side should show highest marks student received along with Subject name.

 

Student Name                 Highest marks obtained               Subject in which highest marks obtained

Student A                                        40 Marks                                         Social Science              

Student B                                       33Marks                                          Language 4

 

Using Max function I am able to find highest marks for specific student however I am unable to get the name of the specific subject in which student got highest marks.

 

Any ideas, suggestions are welcome to help me resolve it.

Categories:
  • Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at

    Hi,

     

    Can you please show me the Table itself so I can define how you can do what you want. Also, is this an Excel Table, SharePoint List, or Dataverse Table?


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • BradAugustene Profile Picture
    71 on at

    Hi There

    I am using Dataverse table.

     

    Each record row contains at lease 100 columns. Within those 100 columns, Total 12 columns are used for various subject headings.

    I have at least 200 students records. sharing extract of dataverse table.

     

    BradAugustene_0-1696403268274.png

     

  • Marshal_Jerome Profile Picture
    88 on at

    Hi

    I tried the same with tables it is working fine. Place the below code at onSelect property of a button and try, it will display the Particular student's top score and corresponding subject.

     

    Set(StudentMarksDetail ,Table(
    {
    StudentID: "1",
    Math :"10",
    Science:"20",
    Social:"15"
    },

    {
    StudentID: "2",
    Math :"40",
    Science:"20",
    Social:"25"
    },

    {
    StudentID: "3",
    Math :"32",
    Science:"43",
    Social:"46"
    },

    {
    StudentID: 4,
    Math :11,
    Science:30,
    Social:15
    }
    )
    );

    ClearCollect(StuDetailsColl,First(Filter(StudentMarksDetail,StudentID = "1"))); //use Selected studend id to filter

    Set( StudentMarksNew,Table(
    {
    ID:Text(First(StuDetailsColl).StudentID),
    MarksSecured:Text(First(StuDetailsColl).Math), //Marks For the Subject1
    SubDesc: "Mathematics" //Harcoded Description for subject 1
    },
    {
    ID:Text(First(StuDetailsColl).StudentID),
    MarksSecured:Text(First(StuDetailsColl).Science), //Marks For the Subject2
    SubDesc: "Science" //Harcoded Description for subject 2
    } ,

    {
    ID:Text(First(StuDetailsColl).StudentID),
    MarksSecured:Text(First(StuDetailsColl).Social), //Marks For the Subject3
    SubDesc: "Social" //Harcoded Description for subject 3
    }

    ));

    Notify(
    Concatenate(
    Text(First(Sort(Filter(StudentMarksNew,ID="1"),MarksSecured,SortOrder.Descending)).MarksSecured),
    "----",
    Text(First(Sort(Filter(StudentMarksNew,ID="1"),MarksSecured,SortOrder.Descending)).SubDesc)),
    NotificationType.Information);

     

     

    Note : While inserting to second table you should insert in the subject order of your main table because the subject description is hard coded.

     

     

     

     

     

    Student.png

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

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard