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)
Showing AVG line with the other lines in a Line Graph
Uday Reddy
Below is the sample data (attached as DATA.txt)
Person
Model_Type----Week---Count
P1 T1 7/25/2011 0:00 134
P2 T1 7/18/2011 0:00 109
P3 T2 7/18/2011 0:00 51
....
....
Problem Statement:(attached pictorial representation as Problem.png)
1. Show a line chart for each model type.
2. Line chart should be on Week Vs Count (there should be one line per Person who has top 10 total_count over the period)
3. Also show a line for Avg_Count (should be different from other lines)
I tried to solve the above problem in the following way (but failed):
1. Group the data on the model_type
2. Group on Person (created a table Person_Counts)
3. Group on Week (created a table Week_AVG_Counts) - to find the avg count per week
4. Bind the Person_Counts table to a Line chart
5. X-axis -> Week, Y-axis -> Count, Option Y-axis Grouping -> Person
Now I am unable to show AVG_COUNT per WEEK line on the line graph.
Suggest me with some solutions for the above problem. Are there any better approaches to this problem.
Eclipse BIRT Designer Version 2.5.0.v20090603
Find more posts tagged with
Comments
mwilliams
Did you figure this out or are you still having this issue? I started looking at this prior to going to JavaOne, but wasn't able to spend much time on it. Let me know.
Uday Reddy
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="83830" data-time="1318001637" data-date="07 October 2011 - 08:33 AM"><p>
Did you figure this out or are you still having this issue? I started looking at this prior to going to JavaOne, but wasn't able to spend much time on it. Let me know.<br /></p></blockquote>
The issue is still open. It would be great if you can give me some solution.
mwilliams
This should at least get you started. I duplicate the records in a scripted dataSet and make all duplicate records have the "Person" be "Average". Then, in the table, I create an aggregation to count the distinct "Person"s in the group and use this value in the chart to figure the actual average if "Person" is equal to "Average". This doesn't limit you to top 10, so you'll have a little work to do still. Let me know if you have questions.
Uday Reddy
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="84057" data-time="1318452203" data-date="12 October 2011 - 01:43 PM"><p>
This should at least get you started. I duplicate the records in a scripted dataSet and make all duplicate records have the "Person" be "Average". Then, in the table, I create an aggregation to count the distinct "Person"s in the group and use this value in the chart to figure the actual average if "Person" is equal to "Average". This doesn't limit you to top 10, so you'll have a little work to do still. Let me know if you have questions.<br /></p></blockquote>
Hi, Thanks for your reply it really helped me. Is there any way to distinguish AVG line from others (like thicker line) and AVG should always be last item in the legend irrespective of the alphabetical order.<br />
<br />
Thanks,<br />
Uday
mwilliams
To get it as the last line, you could make the "person" for the average line be "zzzzzz" and then replace this with "Average" in your script. That would be a simple workaround.