COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bi4u2 on 18 Jun 2012 10:05:16 AM

Title: Crosstab question, how to take 'group span' off
Post by: bi4u2 on 18 Jun 2012 10:05:16 AM
On a list report I can remove the 'group span' if I want to show a grouped value on every row. Is there something I can do for a crosstab? I have a crosstab with 5 items nested as rows and we would like to see all the data on each row.

Thanks!
Title: Re: Crosstab question, how to take 'group span' off
Post by: wyconian on 18 Jun 2012 10:16:06 AM
Hi crosstabs are really designed to aggregate data, I don't think there is any way of taking off the group span.  Why did you make the decision to use a crosstab rather than a list?
Title: Re: Crosstab question, how to take 'group span' off
Post by: bi4u2 on 18 Jun 2012 10:19:28 AM
We are using a crosstab because we need to see a time dimension on the columns. It is a timesheet report to show hours by date - with dates across the top.
Title: Re: Crosstab question, how to take 'group span' off
Post by: wyconian on 18 Jun 2012 10:24:27 AM
OK so whta do you have as your rows and measures.  Can you give an example of what you're getting and what you'd like to get?
Title: Re: Crosstab question, how to take 'group span' off
Post by: bi4u2 on 18 Jun 2012 10:34:36 AM
My rows have groupings such as Project ID, Project Name, Employee ID, Employee Name, Labor Category.

The users were interested in seeing these values on each row so that they can export to Excel.
Title: Re: Crosstab question, how to take 'group span' off
Post by: wyconian on 18 Jun 2012 10:45:41 AM
cool what are your measures?

Basically if you want to see all data you need to bring the lowest possible level of grain into the crosstab. i.e. if your data source records the measures at 'labor sub category' (for example) you will need to bring that into the rows.  The crosstab will then aggregate to that attribute but as it's the lowest attribute you will end up with a detail report.

Does that make sense?
Title: Re: Crosstab question, how to take 'group span' off
Post by: Lynn on 18 Jun 2012 03:27:09 PM
Attached is a technique that might be what you are after. It is done with a relational source. Not entirely sure how it would work with a dimensional source.
Title: Re: Crosstab question, how to take 'group span' off
Post by: CognosPaul on 19 Jun 2012 01:37:34 AM
Another solution:

Hide the crosstab rows. Drag two crosstab spaces directly to the right of the corner. In the facts for the new columns, set "Define Contents" to yes. Unlock the report, drag the fields from the query into the fact cells. Hide the column headers for those two new fields OR hide the crosstab corner.

I wrote a slightly more verbose explanation here (http://www.cognoise.com/community/index.php/topic,11363.msg37230.html#msg37230).
Title: Re: Crosstab question, how to take 'group span' off
Post by: bi4u2 on 29 Jun 2012 03:00:47 PM
Thank you Lynn and everyone. My data source is relational and Lynn's technique is exactly what I was looking for.
Title: Re: Crosstab question, how to take 'group span' off
Post by: Lynn on 20 Jul 2012 09:24:39 AM
I just had to do this with a dimensional source and the approach I posted (which uses concatenation of data items) only works for a relational source.

Paul's approach is MUCH simpler and works beautifully for both relational and dimensional sources.
Title: Re: Crosstab question, how to take 'group span' off
Post by: MFGF on 20 Jul 2012 11:13:11 AM
Rumour has it that Paul is a bit of a genius! I hope he doesn't hear us saying that, though - it will go to his head and he might turn into an evil Bond-type villain with a silly laugh and aspirations of ruling the world! :)