Hello,
I'm trying to create a function in an access query that will create a weighted average. For groups of projects, there is a status and a related rank. For each group the basic idea would be:
(project status)*(project rank)/(sum(project rank)
I've tried the following sql code in query design, but I'm getting an aggregation error
Code:
WA: (([tbl_project].[status]*[tbl_targets].[RANK])/(Sum([tbl_targets].[RANK])))
I had tried the code below, just an average of the projects and their ranks, but this isn't truly a weighted average, and it's certainly showing in my results.
Code:
WA: Avg([tbl_project.[status]*[tbl_targets].[RANK])
Any suggestions of guidance would be greatly appreciated. Thank you!