COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: philelmousse on 31 Aug 2011 02:23:25 AM

Title: Percentage are not display in my column
Post by: philelmousse on 31 Aug 2011 02:23:25 AM
Hello,

I have a crosstab with a percentage column based on a calcul : Delta - Budget
The data format of the column is percent but it display only '1' or '0'... I really dont understand
Title: Re: Percentage are not display in my column
Post by: MFGF on 31 Aug 2011 09:47:51 AM
A percentage format expects the underlying value to be a decimal, usually as a result of a division.  What values do you see without the percentage format applied?

Otherwise, do you have any sort of scale applied to the format?  How many decimal places are specified?

Regards,

MF.
Title: Re: Percentage are not display in my column
Post by: barrysaab on 01 Sep 2011 08:55:29 AM
This brings up another question,suppose i don't have my values in decimal instead they are like 10,20...etc and stiil i want to show them as 10%,20%,30%,how do i do that?
Title: Re: Percentage are not display in my column
Post by: MFGF on 01 Sep 2011 09:39:15 AM
I can think of two options:

1. Divide the values by 100 in a query calculation then display this, formatted as a percentage.
2. If this is a List report, unlock your structure (using the padlock button) and drag a text item from the toolbox inside the list column, right after the value. Enter a % sign as the text character.  Remember to relock your structure afterwards.

Regards,

MF.
Title: Re: Percentage are not display in my column
Post by: barrysaab on 01 Sep 2011 10:16:23 AM
Thanks.MF.Once again very logical and simple.Aprreciate it.
Title: Re: Percentage are not display in my column
Post by: philelmousse on 05 Sep 2011 10:58:14 AM
This is decimal values and i put default format it display 0 and -1
Title: Re: Percentage are not display in my column
Post by: philelmousse on 08 Sep 2011 03:04:20 AM
My percentage column is a division of two columns, like this :

-3,253 / 17,086 display 0... I dont know why
Title: Re: Percentage are not display in my column
Post by: MFGF on 08 Sep 2011 04:26:01 AM
What happens if you change the format to show four decimal places?  Does it return 0.0000 or do you see expected values?

MF.
Title: Re: Percentage are not display in my column
Post by: philelmousse on 08 Sep 2011 05:34:00 AM
it display only 0 even with 4 decimal places
Title: Re: Percentage are not display in my column
Post by: philelmousse on 12 Sep 2011 06:47:08 AM
nobody can help ? :/
Title: Re: Percentage are not display in my column
Post by: leahmarie on 12 Sep 2011 09:04:57 AM
Have you looked into the solve order?  For example are delta and budget calculated items? Usually if I am having a problem like this it's a gotcha moment, and changing the solve order completely fixes it.  Whatever needs to be calculated last should have the highest number.  Doesn't really matter what number it is.
Title: Re: Percentage are not display in my column
Post by: philelmousse on 12 Sep 2011 10:39:43 AM
they are calculated measures and the delta and percentage are set to solve order 2. If i try the divide the delta by the budget with decimal values the result is only 0, 1 or -1...
Title: Re: Percentage are not display in my column
Post by: leahmarie on 12 Sep 2011 04:24:11 PM
I would try to set the solve order for the percentage to the highest even after the delta and see what happens then.
Title: Re: Percentage are not display in my column
Post by: leahmarie on 12 Sep 2011 04:26:31 PM
Because I would think that the percentage needs to be calculated after your delta is calculated; hence you are dividing delta by whatever other measure.  You might also make sure there are no zeros; sometimes when there are any zeros in my calculated measure and then I have my data format to turn n/a or divide by 0 or nulls to 0s then it gives me a zero and I put in an if statement to make zeros nulls so that my math still works.  I'm not sure that's your problem but I have ran into it more than once.
Title: Re: Percentage are not display in my column
Post by: philelmousse on 13 Sep 2011 10:58:52 AM
the solve order doesnt have any effect for me :(
Title: Re: Percentage are not display in my column
Post by: philelmousse on 16 Sep 2011 06:14:54 AM
I found the problem. Cognos doesnt like when you copy paste, it could cause some trouble. So I had to rebuild my crosstabs to correct that