Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Transposing Columns to Rows Best methods
jimseconde
<p>Hi,</p>
<p> </p>
<p>There seems to be several ways to achieve what I'm trying to do, but it's not entirely clear to me (I'm only just getting the hang of crosstabbing and dimensions)</p>
<p> </p>
<p>I have data laid out like so:</p>
<p> </p>
<p>Month 100 100-500 500-1000</p>
<p>Jan 342 423 234</p>
<p>Feb 133 234 123</p>
<p>Mar 533 344 231</p>
<p> </p>
<p>What I'm trying to get out of this dataset is a bar chart, with the columns as the X-Axis and the total value as the Y-Axis.</p>
<p> </p>
<p>Transposing the columns to rows is doable in a crosstab, but how can I do it for the dataset in order for the data to be used correctly in each axis of a bar chart?</p>
<p> </p>
<p>Thanks in advance</p>
Find more posts tagged with
Comments
Hans_vd
<p>You can create a crosstab and then right-click -> <span style="color:rgb(0,0,0);font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;background-color:rgb(244,244,244);">"Create chart view"</span></p>
<p> </p>
<p>Does that do the trick for you?</p>
jimseconde
<p>It's not liking the dataset it's being given at the moment - which in the crosstab is correct.</p>
<p> </p>
<p>Data Preview for the chart view is still viewing all of the crosstabbed columns as columns as it were rather than transposing them to rows. I also can't define the axis, though I'm not sure whether you're supposed to be able to do that.</p>
jimseconde
<p>To follow up-</p>
<p> </p>
<p>According to the layout of the bar chart, the above data would need to look like this:</p>
<p> </p>
<p>Dist TOTAL</p>
<p>100 1008</p>
<p>100-500 1001</p>
<p>500-1000 588</p>
<p> </p>
<p>So that I drop 'Dist' into the Y-Axis and TOTAL into the X-Axis.</p>
<p> </p>
<p>This takes about 1 minute in Excel. Are we saying BIRT isn't able to total rows and put them in a bar chart?</p>
JFreeman
<p>Can you attach a sample report with a flat file data source that demonstrates your data configuration and data set you are wanting to created into a bar chart?</p>
<p> </p>
<p>I am not clear from your description the way this is configured.</p>
<p> </p>
<p>Also, are you sure you are wanting 'Dist' as the Y-Axis and 'TOTAL' as the X-Axis? This seems backwards to me.</p>
jimseconde
<p>Hi,</p>
<p> </p>
<p>Thanks for the reply.</p>
<p>Yes, sorry I got my axes mixed up: 'Dist' is X, Total numbers are Y.</p>
<p> </p>
<p>Transposing is still a problem, but a different beast now. I got so bored finding workarounds for CSV/Excel transposing (without transposing at source which would take 5 mins to be honest) that I switched to JDBC and am now fighting transposing with SQL connecting to an Oracle 10g database.</p>
<p> </p>
<p>So, as my solution and problems change there's not really much need to attach what I was working on.</p>
<p> </p>
<p>Transposing data rather than crosstabbing seems to be involved in almost everything I'm doing at the moment, yet it seems to be the least friendly aspect of data drilling/manipulation in BIRT....</p>
JFreeman
<p>Thanks for the update and details.</p>
<p>Let us know if you have any additional specific questions.</p>