I am having some issues with expressions as I am attempting to perform the
following:
iif(budget=0,0,actual/budget)
it seems that regardless of the expression all clauses are evaluated.
The actual expression is as follows:
=iif( Sum(Fields!BudgetMTD.Value, "DepartmentDetGrp")=0,0,
Sum(Fields!ActualMTD.Value, "DepartmentDetGrp")/ Sum(Fields!BudgetMTD.Value,
"DepartmentDetGrp"))
Any suggestions to get around this?IIF is a function call which evaluates all arguments - hence the division by
zero.
Change the call to use the following pattern to avoid the issue:
=IIF(budget=0, 0, actual / IIF(budget = 0, 1, budget))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Fuller" <DavidFuller@.discussions.microsoft.com> wrote in message
news:14E1BFB1-3D84-449F-819C-3C1C5DBD9288@.microsoft.com...
>I am having some issues with expressions as I am attempting to perform the
> following:
> iif(budget=0,0,actual/budget)
> it seems that regardless of the expression all clauses are evaluated.
> The actual expression is as follows:
> =iif( Sum(Fields!BudgetMTD.Value, "DepartmentDetGrp")=0,0,
> Sum(Fields!ActualMTD.Value, "DepartmentDetGrp")/
> Sum(Fields!BudgetMTD.Value,
> "DepartmentDetGrp"))
> Any suggestions to get around this?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment