简体   繁体   中英

SSRS Multiple IF SUM based on paramter

I've been struggling with this for a few hours if anyone can help.

=IIF(Parameters!Agent.Value ="Susan Calladine", (Sum(Fields!Susan_Calladine.Value) / Sum(Fields!InvitedToApply.Value), IIF(Parameters!Agent.Value ="Fazaila Pirbhai", (Sum(Fields!Fazaila_Pirbhai.Value) / Sum(Fields!InvitedToApply.Value), IIF(Parameters!Agent.Value ="Claire Willis", (Sum(Fields!Claire_Willis.Value) / Sum(Fields!InvitedToApply.Value),0)))

Basically to calculate specific fields based on the value of the parameter being returend

Since the error you're getting no doubt refers to a ')' being expected either add a closing ) to each of your SUM clauses

(Sum(Fields!Susan_Calladine.Value) / Sum(Fields!InvitedToApply.Value))

or get rid of the opening ( in each case

Sum(Fields!Susan_Calladine.Value) / Sum(Fields!InvitedToApply.Value) .

Personally I'd go for the second as it will make the expression a little more readable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM