E
Eric
Someone Please Help? I will really appreciate it.
I am trying to get the DSum function to work with multiple conditions.
I can get the following to work if I limit it to the first condition
in the criteria, (regarding current mapping), but when I add the
others, I get "#Error" in the [Avg Credited Rate] field.
The query I am running is named, "[Test Weighted Avg]".
[Current Mapping] is a string field, this field is never Null.
[Guarantee Period] is a number, sometimes this field is Null.
[DCA Type] is a number, sometimes this field is Null.
[DCA Period] is a number, sometimes this field is Null.
Here is my expression for [Avg Credited Rate]
Avg Credited Rate: [Rate]*[Amount]/DSum("[Amount]","[Test Weighted
Avg]","[Current Mapping] = '" & [Current Mapping] & "' AND [Guarantee
Period] = " & [Guarantee Period] & " AND [DCA Type] = " & [DCA Type] &
" AND [DCA Period] = " & [DCA Period])
After I get this to work, I want to enclose it all inside Sum() by
changing the query to a Totals query and Group By: [Current Mapping],
[Guarantee Period], [DCA Type], and [DCA Period]. This will give me a
weighted average for each unique group.
I've been struggling with this for a long time and I'm begging someone
to please help me!
Thanks very much,
Eric
I am trying to get the DSum function to work with multiple conditions.
I can get the following to work if I limit it to the first condition
in the criteria, (regarding current mapping), but when I add the
others, I get "#Error" in the [Avg Credited Rate] field.
The query I am running is named, "[Test Weighted Avg]".
[Current Mapping] is a string field, this field is never Null.
[Guarantee Period] is a number, sometimes this field is Null.
[DCA Type] is a number, sometimes this field is Null.
[DCA Period] is a number, sometimes this field is Null.
Here is my expression for [Avg Credited Rate]
Avg Credited Rate: [Rate]*[Amount]/DSum("[Amount]","[Test Weighted
Avg]","[Current Mapping] = '" & [Current Mapping] & "' AND [Guarantee
Period] = " & [Guarantee Period] & " AND [DCA Type] = " & [DCA Type] &
" AND [DCA Period] = " & [DCA Period])
After I get this to work, I want to enclose it all inside Sum() by
changing the query to a Totals query and Group By: [Current Mapping],
[Guarantee Period], [DCA Type], and [DCA Period]. This will give me a
weighted average for each unique group.
I've been struggling with this for a long time and I'm begging someone
to please help me!
Thanks very much,
Eric