|
Subject:
|
iff statement not working
|
|
Posted By:
|
barmanvarn
|
Post Date:
|
8/24/2005 8:35:24 PM
|
I have the following statement:
=iif( Fields!Ticket_Budget.Value = 0,0, Fields!Ticket_Sales.Value/Fields!Ticket_Budget.Value)
For some reason, it keeps trying to divide by zero when the budget fields IS equal to zero.
Any suggestions?
|
|
Reply By:
|
bsullins
|
Reply Date:
|
10/3/2005 12:12:05 PM
|
This is one of the major PITA's in Reporting Services...
Reporting Services evaluates every part of the if statement so you have to do a nested if that evaluates to 1 if the value of ur field is 0.
Like so...
=iif(Fields!Ticket_Budget.Value=0,0,iif(Fields!Ticket_Budget.Value=0,1,Fields!Ticket_Sales.Value/Fields!Ticket_Budget.Value))
Try that...
-- Ben Sullins Sql Developer - Our Vacation Store
|