COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: miggg77 on 16 Sep 2013 04:00:01 AM

Title: Report Sudio Percent crosstab calculation
Post by: miggg77 on 16 Sep 2013 04:00:01 AM
Dear Cognos Comunity,
need help please !


                                  |base in hours|holiday in hours|external work in hours|....
-----------------------------------------------------------------------------
Company1 | TimePeriode|  400         |     16             |        200                    |....
Company2 | TimePeriode|  290         |     54             |          99                    | ....
Company3 | TimePeriode|  365         | .....
Summary ( TOTAL )        | 1055        | .....

My crosstab is explained above . The column "base in hours" are always 100% values and i need for every company row
an additional row named percentageval that shows "holiday, external work, ..." as percent value from base.

Company1 | TimePeriode     | 400                   |     16               |        200                    | ...
     -->       | percentageval  | 400 or 100%     |    4%              |         50%                   |     <--

I've worked with empty crosstablespace and layoutcalculation, but the values are wrong. I don't know why ..

Thanks for time and knowhow
Title: Re: Report Sudio Percent crosstab calculation
Post by: blom0344 on 16 Sep 2013 04:29:01 AM
How did you define the percentage calculations?
Title: Re: Report Sudio Percent crosstab calculation
Post by: miggg77 on 16 Sep 2013 06:12:39 AM
Hello, thanks for reply !

my percentage calculation for holiday, external work,  ... is
                                                 
percentageval = 100/[Query1].[base]*[Query1].[holiday]

percentageval = 100/[Query1].[base]*[Query1].[external work]

...

percentageval is an empty crosstab row/field
percentageval | base in hours is a textfield to show"100%"
Title: Re: Report Sudio Percent crosstab calculation
Post by: blom0344 on 16 Sep 2013 07:35:19 AM
I would expect something like:

total([holiday in hours] for [company])/total([base in hours] for [company])

i.e. :  16/400 = 0.04  (formatted as percentage yields 4%
Title: Re: Report Sudio Percent crosstab calculation
Post by: miggg77 on 16 Sep 2013 09:14:22 AM
Thank you, blom0344

I've klicked the lock for unlock
i drag the layoutcalculation from toolbox and drop it into the empty crosstable cell.
the reportexpression dialog appears
my expression definition looks like

total([holiday in hours] for [company]) / total([base in hours] for [company])

press ok
close the lock
testing
but an error occured while testing. CRX-API-0011 Funktionname not found


if i define a dataitem with the same definition it looks good but in the report cell show nothing