COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: rsomoza on 07 Jan 2016 09:11:11 AM

Title: Unable to get a total for a column with content defined set to Yes
Post by: rsomoza on 07 Jan 2016 09:11:11 AM
Hello to all

I'm working on a cross tab that has a column showing results with option Define Contents > Yes.
Please check screenshot I have attached.

I have Drivers that belong to different areas. Each of them have its unit. The five first columns results are correct. These values come directly from DB. The last column has, in each of the cells, a content defined, where I inserted query calculations, results are OK for each row. This column uses a different query than the one used by the table itself.

The problem comes with the Total row, you see it shows correct totals for all columns expect for Target. I have also inserted a content in the total for target, where my query calculation is the sum of each of the target cells, but as you see it doesn't return results. Why could that be?

I tried setting Total and Calculation aggregation to targettotal2 cell (the one displaying "-"), but with no luck.

Please any comments would be great!!
Title: Re: Unable to get a total wor a column with content defined set to Yes
Post by: rsomoza on 07 Jan 2016 09:25:22 AM
I also tried this link: http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/define-contents-property-in-report-studio-1844659

I have set calculated aggregation and solve order to 2 in all my "working" defined cells, and in the total I set order to 1. But still not working, it continuous showing "-"
Title: Re: Unable to get a total for a column with content defined set to Yes
Post by: sdf on 07 Jan 2016 08:24:34 PM
have you tried switching the solve order?
or
dont put anything in the solve order for your defined cells. and set 2 for your total
Title: Re: Unable to get a total for a column with content defined set to Yes
Post by: rsomoza on 08 Jan 2016 09:32:54 AM
Thanks for the response... but didn't work..
to add mode details:

each cell in target column has a calculation like this, let's say the query calculation item is called X1... Xn:

X1 = (tuple([sssss].[sss].[sss].[ssss]->[all].[479],
[sss].[ss].[CFY]))
/
(tuple(tuple([sssss].[sss].[sss].[ssss]->[all].[479],
[sss].[sss].[FY14]))

The same is for X2.. Xn, where the main difference between them is the ID number inside the tuple and the CFY factor.
Those give correct results.

when I create a final query item  Total = x1+x2+...xn
That one shows nothing. Not sure if it is a limitation or a setting I'm not aware of.

Obviously, Xn and Total use the same Query.
I set Content Define to Yes and then add a Singleton. Inside the singleton I insert the specific query calculation.

Any help please! I have several tables depending on that total :(
Title: Re: Unable to get a total for a column with content defined set to Yes
Post by: rsomoza on 12 Jan 2016 07:26:12 AM
In case it helps to someone, I was able to manage this by using a value function. Like this:

X1 = value((tuple([sssss].[sss].[sss].[ssss]->[all].[479],
[sss].[ss].[CFY])))
/
value((tuple(tuple([sssss].[sss].[sss].[ssss]->[all].[479],
[sss].[sss].[FY14])))

and

X2= value(......

...

Then the Total = X1+X2 ... shows results.