how to sum highest 5 values in access crosstab query (1 Viewer)

zachariack

New member
Local time
Today, 11:00
Joined
Jan 18, 2024
Messages
1
Sl NoNameSubjectExam 1Exam 2Exam 3Exam 4Exam 5Exam 6Exam 7Exam 8Exam 9Exam 10TotalSum of Highest 5
1AAAAEnglish
89​
88​
87​
86​
85​
98​
82​
96​
95​
90​
896​
????
2BBBBEnglish
95​
68​
9​
96​
32​
94​
63​
56​
56​
65​
634​
????
2CCCCMaths
95​
68​
9​
96​
32​
94​
63​
56​
56​
65​
634​
????
 

ebs17

Well-known member
Local time
Today, 10:00
Joined
Feb 7, 2020
Messages
1,946
INSIDE the crosstab query not at all. Such an operation is not provided for in a KTA, and SQL works row-oriented, not column-oriented.
However, you can determine the desired sum in another query and then link this query to the KTA.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:00
Joined
May 7, 2009
Messages
19,243
you need to create a Top 5 Query first(1_Top5BySINo on demo and 2_SumTop5Score an append query), then append it to a temporary table.
next, you create a Crosstab from your table joining the temporary table.
 

Attachments

  • Exams.accdb
    948 KB · Views: 34

ebs17

Well-known member
Local time
Today, 10:00
Joined
Feb 7, 2020
Messages
1,946
KTA = crosstab query (Kreuztabellenabfrage)
 

cheekybuddha

AWF VIP
Local time
Today, 09:00
Joined
Jul 21, 2014
Messages
2,280
Ach so! Alles klar.

(Not obvious in an English language forum!)
 

ebs17

Well-known member
Local time
Today, 10:00
Joined
Feb 7, 2020
Messages
1,946
Yes, my error..
I wasn't thinking clearly because I also want someone to copy data from an image into a usable Access table.
 

cheekybuddha

AWF VIP
Local time
Today, 09:00
Joined
Jul 21, 2014
Messages
2,280
No problem! It's interesting to learn the terminology in another language! (y)
 

Users who are viewing this thread

Top Bottom