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)
Convert dataset columns into row (for pie chart)
hq4ever
Hi !<br />
<br />
The dataset is configured as following :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>|Category Id | Select Count | Select effect | Pick Count | Pick effect |
| 0 | 1000 | 34 | 399 | 20 |
| 1 | 1403 | 94 | 709 | 90 |
.
.
.
</pre>In my report I'm displaying a table, which shows all columns: Category Id, Select Count, Select effect, Pick Count, Pick effect. Additional I would like to display a pie that will contain 2 "slices" representing 100% this will consist from Select Count & Pick Count.<br />
<br />
As far as I understand, I need to convert my dataset column into a new dataset (just for the chart) that will contains 2 rows, each row with my required slice.<br />
<br />
Is this the correct approach for this? <br />
If so, How should I do this?<br />
<br />
Thank you,<br />
Maxim.
Find more posts tagged with
Comments
mwilliams
Hi Maxim,
Can you explain more about what you're wanting to chart? Are you wanting to do a pie chart for each "category" of your dataSet? Comparing "select count" and "pick count"? Or an overall summation of those two fields for all categories together? Let me know. Either way, I don't think you'll need to do a new dataSet for anything.
hq4ever
Hello mwilliams,
For your question - I would like to display the chart per category.
The layout of my report is a table that contains 2 detail rows.
Row 1 shows "select count counter" and "pick count counter" of category X
Row 2 should display the Pie build from "select count counter" + "pick count counter". The pie will always contains only 2 slices.
Thank you for your time and effort to help me.
Maxim.
mwilliams
Maxim,
What version of BIRT are you using?
hq4ever
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Maxim,<br />
<br />
What version of BIRT are you using?</p></blockquote>
<br />
BIRT 2.5, with eclipse 3.5.
mwilliams
Maxim,
Sorry, it looks like I misunderstood at first. Yeah, you'll probably have to create a dataSet that has the values you're wanting all in one column for the chart.
Something like the attached report design does. There may be other ways as well.
kpriyaa2
i have to convert column to row in birt.am newer to birt. is there any way to convert column to row, if it is possible means its very useful to my project.can any one help me.
Thanks in advance
priya
mwilliams
Hi priya,
Can you explain more about what you're trying to achieve? What does your data look like? What do you want the report to look like? etc. Thanks.
kpriyaa2
Thanks for ur reply.i have table which contains the field like port,line,commodity.i want to display field line values as a row.For eg my table look like this
port line commodity
chennai CME paper
tuticorin DMN cotton
mangalore CNC fabrics
chennai EMA cashewnut
i want to display the table as
port CME DMN CNC EMA
chennai 20 23 12 10
Tuticorin 10 23 45 12
mangalore 30 21 24 23
chennai 13 29 38 12
Regards,
priya.
mwilliams
Priya,
Where do the numbers come from? Initially, it looks like you should be able to use a crosstab to get the display you're looking for.
kpriyaa2
Numbers are from the same table not from another table.Actually my table contains too many fields such as Port1, Type1, Line, Sector, Country, Port2, Commodity, C20, C40, C45, HC40, OT20, R20, R40, TEU, _TEU_Line_, F17, F18.That numbers are field values of C20,C40,C45,TEU.
one of the field line in my table has values like CMA,CNC,DMA,CCA,DAC.these values are displayed vertically but i want to display horizontally as a field heading.
Actually the fields look like :
line
CME
DMN
CNC
EMA
DAC
where line is field heading and the remaining are field values
but i want to display like
line CME DMN CNC EMA DAC
where as i want to display those individual values as header i.e. as column field
Regards
Priya
kabilan_n
Hi Priya,<br />
<br />
Hope this may help you.<br />
<br />
<a class='bbc_url' href='
http://stackoverflow.com/questions/3956345/column-to-row-in-sql-server'>My
link</a><br />
<br />
-- Kabil
Hans_vd
<blockquote class='ipsBlockquote' ><p>Hope this may help you.</p></blockquote>
<br />
Let's hope help isn't necessary anymore. The question was posted more than 3 years ago.