Calculated field for max value rollup (1 Viewer)

Lb_User

New member
Local time
Today, 04:22
Joined
Jan 18, 2017
Messages
5
I have a database where for each person (ID), I need to calculate the most adverse score by weight (0 is worse than a 10) by section. See SectionRollup for expected value.

For each ID and SectionTitle, what score has the highest (max) weight?

IDSectionTitleScoreWeightSectionRollup
11338
11888
120110
13333
212210
21101010
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:22
Joined
Oct 29, 2018
Messages
21,467
Hi. Have you tried using a Totals query? If you want to show all the columns, you may have to create two or three queries. Another option is to use the DMin() function.
 

Lb_User

New member
Local time
Today, 04:22
Joined
Jan 18, 2017
Messages
5
I can't figure out how to do a totals query or DMax formula that takes two columns into account and then to dump the result in a new column.
DMax(«expression», «domain», «criteria») ----- my interpretation: Dmax([CaseData.].[Weight]),[CaseData],???)

See attached - let me know if more info would help.
 

Attachments

  • Sample DB.accdb
    380 KB · Views: 74

theDBguy

I’m here to help
Staff member
Local time
Today, 04:22
Joined
Oct 29, 2018
Messages
21,467
I can't figure out how to do a totals query or DMax formula that takes two columns into account and then to dump the result in a new column.
DMax(«expression», «domain», «criteria») ----- my interpretation: Dmax([CaseData.].[Weight]),[CaseData],???)

See attached - let me know if more info would help.
Hi. I hope I understood what you wanted. Please see the attached and open the query qryScoreRollup and let us know if it's correct or not.
 

Attachments

  • Sample DB (2).zip
    20.2 KB · Views: 79

Lb_User

New member
Local time
Today, 04:22
Joined
Jan 18, 2017
Messages
5
Thank you theDBGuy, it works perfectly! You saved me so much time.
 

Users who are viewing this thread

Top Bottom