COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: Desperado on 11 Nov 2005 10:38:05 PM

Title: Syntax for percentage
Post by: Desperado on 11 Nov 2005 10:38:05 PM
Hi ,
This is my query to display the values in percentage. is there any wrong in the syntax..

IF ([DS].[DIM].[PERCENT_FLAG]='Y')
THEN (round([DS].[PKG_1].[BU2],[DS].[DIM].[PRECISION])*100)
ELSE
(round([DS].[PKG_1].[BU2],[DS].[DIM].[PRECISION]))

Thanks in Advance
Title: Re: Syntax for percentage
Post by: sir_jeroen on 12 Nov 2005 12:01:57 PM
What's going wrong?
Title: Re: Syntax for percentage
Post by: mikegreen on 12 Nov 2005 04:22:31 PM
Quote from: Desperado on 11 Nov 2005 10:38:05 PM
Hi ,
This is my query to display the values in percentage. is there any wrong in the syntax..

IF ([DS].[DIM].[PERCENT_FLAG]='Y')
THEN (round([DS].[PKG_1].[BU2],[DS].[DIM].[PRECISION])*100)
ELSE
(round([DS].[PKG_1].[BU2],[DS].[DIM].[PRECISION]))

Thanks in Advance

Why not just click on your data item, then "data format" and choose percentage. It'll do that for you.

You can make it apply certain formatting based on data elements using conditional formatting.

Cheers

Mike
Title: Re: Syntax for percentage
Post by: bdybldr on 13 Dec 2005 08:03:53 PM
Have you tried using a static value instead of "[DS].[DIM].[PRECISION]" just to see if it works?