COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: chinnucognos on 23 Apr 2014 05:06:43 AM

Title: Calculated Data item
Post by: chinnucognos on 23 Apr 2014 05:06:43 AM
Hi everyone,

I have dimensional data in a report, i need to display ((Q1*Q2)+(S1*S2))/(Q2+S2) data item in list report.
Now when the Q1=Q2=S1=S2=0, then it has to display '0' as per calculation, but it is throwing as '/0'.

I have nvl function, but it is throwing error as "nvl fucntion not valid for integer, character and double data types"
Can you guys help on this......
Title: Re: Calculated Data item
Post by: navissar on 23 Apr 2014 06:05:50 AM
You can actually skip all the logic, highlight the column, go to data format, set the format to number and under "Divide by zero characters" put in "0".
Title: Re: Calculated Data item
Post by: chinnucognos on 23 Apr 2014 08:39:02 AM
Thanks a lot Avissar... it worked :D