COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: dxwallace on 09 Jun 2007 10:28:46 AM

Title: Divide By Zero problem
Post by: dxwallace on 09 Jun 2007 10:28:46 AM
How Do I write a calculation for a numeric data item that keeps giving me teh value of "/0" ?

the way I am currently writing it is

((fieldA - FieldB) /  FieldB ) * 100)
Title: Re: Divide By Zero problem
Post by: mrcool on 11 Jun 2007 08:45:40 AM
use decode function and try 2 put '1' in place of '0'.
Title: Re: Divide By Zero problem
Post by: dxwallace on 11 Jun 2007 08:52:03 AM
Thanks