Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Multiple independent groups in a crosstab
plaflamme
Hi,<br />
<br />
I'm trying to build a crosstab that displays multiple groups from a data cube, all crossed with the same dimension. I can do this now, but I need to define multiple crosstabs. I wonder if there's an easier way.<br />
<br />
The use-case: cross "Age" w/ "Gender", "Income" w/ "Gender" and present like so:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
| | MALE | FEMALE | Total |
| Age | | | |
| 18-34 | | | |
| ... | | | |
| Total | | | |
| Income| | | |
| 0-10K | | | |
| ... | | | |
| Total | | | |
</pre>
<br />
My cube has all three dimensions (age, income and gender). This table provides a summary of multiple dimensions crossed against a common one...<br />
<br />
Is this doable or do I need to make multiple crosstabs? If I need to make multiple crosstabs, what is the best way to "hide" the header of subsequent ones?<br />
<br />
Thanks,<br />
Philippe
Find more posts tagged with
Comments
mwilliams
Hi Philippe,
You could make your query or use joins in a way to get your data like:
category | category value | gender
income | 8000 | Male
income | 10000 | Female
Age | 18 | Male
Age | 22 | Female
Then create a computed column that creates the row dimension field by checking the category then category value and make it something like:
category | category value | gender | rowDimension
income | 8000 | Male | income 0-10k
income | 10000 | Female | income 0-10k
Age | 18 | Male | Age 18-34
Age | 22 | Female | Age 18-34
You should be able to then use this data for a single crosstab.
If you can't do that, multiple crosstabs is probably the way to go. In this case, you should be able to hide the labels by setting the display property of the cells to "no display".
plaflamme
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="70920" data-time="1291222105" data-date="01 December 2010 - 09:48 AM"><p>
You could make your query or use joins in a way to get your data like:<br /></p></blockquote>
<br />
It isn't an SQL query, its a custom ODA.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="70920" data-time="1291222105" data-date="01 December 2010 - 09:48 AM"><p>
If you can't do that, multiple crosstabs is probably the way to go. In this case, you should be able to hide the labels by setting the display property of the cells to "no display".<br /></p></blockquote>
<br />
Thanks, I got the labels to disapear, but the layout is still weird because of the extra table cell (there are 2 header rows in a crosstab). Is there a way to get rid of one row?<br />
<br />
Thanks,<br />
Philippe
mwilliams
Philippe,
Can you show a screenshot of what you're talking about?
plaflamme
Here's the result of using multiple cross-tabs:
mwilliams
In the "general" section of the property editor for the crosstab, you can choose to "hide measure header". This should hide the measure header cell. As for the other cells, you should be able to select the cell, go to the property editor, go to the advanced tab, go to the "section" section, and set the display setting to "no display". This should hide that cell completely. You may need to put a label in between each crosstab to display what is shown in each rather than putting the label in the row label area so that the other cells can go away.