Hello,
how would I write an if statement to ensure that a "0" is displayed if a
divide 0/0?
Thanksiif(<field.total>=0,0,<field.numerator>/(<field.total>)
U. Tokklas
"Fab" wrote:
> Hello,
> how would I write an if statement to ensure that a "0" is displayed if a
> divide 0/0?
> Thanks
>
>|||Note: IIF is a function call. All arguments get evaluated before invoking
the function. Therefore, a DivisionByZero can still happen.
Use the following pattern:
=iif( Fields!Total.Value = 0, 0, Fields!X.Value / iif(Fields!Total.Value=0,
1, Fields!X.Value))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tokklas" <Tokklas@.discussions.microsoft.com> wrote in message
news:7381410F-FE63-4DAA-9D8D-3F426D24CCD8@.microsoft.com...
> iif(<field.total>=0,0,<field.numerator>/(<field.total>)
> U. Tokklas
>
> "Fab" wrote:
>> Hello,
>> how would I write an if statement to ensure that a "0" is displayed if a
>> divide 0/0?
>> Thanks
>>
>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment