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)
problem about 3 aggregated series in one chart.
elvis_tu
Hello,
I want to display max/avg/min order total for each customer.
my data set
[SQL]
select
o.customernumber,
o.ordernumber,
sum(d.quantityordered * d.priceeach) as ordertotal
from orders o, orderdetails d
where
o.customernumber >= 100 and o.customernumber <= 150 and
o.ordernumber = d.ordernumber
group by o.customernumber, o.ordernumber
order by o.customernumber, o.ordernumber
[Preview]
CUSTOMERNUMBER ORDERNUMBER ORDERTOTAL
103 10123 14571.44
103 10298 6066.78
103 10345 1676.1399999999999
112 10124 32641.980000000003
112 10278 33347.88
112 10346 14191.120000000003
114 10120 45864.03
114 10125 7565.08
114 10223 44894.73999999999
114 10342 40265.6
114 10347 41995.62
119 10275 47924.189999999995
119 10315 19501.82
119 10375 49523.66999999999
I design a line chart with 2 series in one Y axis:
Categories (X) series: row["CUSTOMERNUMBER"]
grouping is enabled [type: Numeric, Interval: 1, Aggregate Expression: Maximum]
Series 1 in y series: row["ORDERTOTAL"], aggregation function: Max
Series 2 in y series: row["ORDERTOTAL"], aggregation function: Avg
The chart is OK.
Then I design another line chart with 3 series in one Y axis:
Categories (X) series: row["CUSTOMERNUMBER"]
grouping is enabled [type: Numeric, Interval: 1, Aggregate Expression: Maximum]
Series 1 in y series: row["ORDERTOTAL"], aggregation function: Max
Series 2 in y series: row["ORDERTOTAL"], aggregation function: Avg
Series 3 in y series: row["ORDERTOTAL"], aggregation function: Min
The chart engine drew Series 1 correctly, but wrong for Series 2 & Series 3.
I also design a table with table grouping to check the correction of the chart.
p.s. Im tring the aggregation in the chart, of course, I could redesign my data set to do aggregation using SQL grouping.
Could anyone help me to fix this problem?
Attachment is my rptdesign file.
Thanks for your helps.
Find more posts tagged with
Comments
mwilliams
Hi elvis_tu,
What version of BIRT are you using? Let me know and I'll check it out.
elvis_tu
the version info in my .rptdesign file:
<property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build <2.3.2.v20090304-1357></property>
mwilliams
elvis_tu,<br />
<br />
This looks like a bug to me. Please log it at <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>BIRT
: Reporting Bugs and Requesting Enhancements</a>. You may do a quick check before logging it to make sure it hasn't already been logged.<br />
<br />
As a workaround, you can create a computed column that is of type float that just mirrors the "ORDERTOTAL" value and use that value in the chart instead and it seems to work just fine. Not exactly sure why that is, but it does. Let me know if it works for you.
mwilliams
elvis_tu,
Scratch logging it as a bug. I just tried it in BIRT 2.5M7 and it seems to work as expected without the workaround. It must be a known issue.