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)
Data from grouped elements in chart
arod
Hi to all
I'm trying retrieve data from the elements that had been grouped when enabling grouping in an x-series Chart.
This is my scenario: I have a dataset with one date-time column an another with a value, I'm using the date-time in the categories series and the values one in values series to display the avg value in months or weeks, or etc. I need to display in the corresponding tooltip of my series values the range that is been taken, something like:
"Value: xx (Range 01/01/10 - 01/07/10)" in case of week grouping, I've tried creating computed columns with the aggregation min, max, first and last in my data set and in the Data binding dialog from the Select Data tab of the Edit Chart dialog and I can only get the values from my whole table instead from each group.
I neet to display those same range dates into the categories series labels, as currently is displayed only the first date, I'll thank the info to achieve that too.
I'm using BIRT Version: 2.5.2.v20090925-7
Does anyone how can I get that working? Any help would be so much appreciated.
Thanks!
Find more posts tagged with
Comments
mwilliams
Hi arod,
Let me make sure I understand what you're trying to do. You want the tooltip of your grouped chart to show the date range of the week that is grouped into it? Is this correct?
arod
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="69112" data-time="1286398040" data-date="06 October 2010 - 01:47 PM"><p>
Hi arod,<br />
<br />
Let me make sure I understand what you're trying to do. You want the tooltip of your grouped chart to show the date range of the week that is grouped into it? Is this correct?<br /></p></blockquote>
<br />
Yes, that's it, so it shows the start and end date for each range, oh, and if is it possible to accomplish that for the categories series labels too! (sorry I was updating my post while you were writting your answer
)
mwilliams
Your best bet might be to create a computed column that finds the day of week of the current row's date and creates a range in a string field based on that. For example, if you check and see that the current row is a Tuesday, you'd subract 2 days for the first date of the range and add 4 to find the end range. Then you'd just build a string value to display this like "MM/dd/yyyy(rangeStart) - MM/dd/yyyy(rangeEnd)" and use this as your category axis field.
Let me know if you have questions.
arod
Hi, Michael!, thanks for your answer, and sorry for my delay but I haven't had time to implement it till now.
I've done it and it's going good, how ever I have some issues.
This is my more explained scenario:
I have three datasets, the first return
1. A value row
2. A title row -titleRow-
3. Some other stuff
The second one is a a scripted one with three rows
1. A sequential generated date -dateRow-
2. The one with the grouping text value -groupRow- ('mm/dd/yy(start) - mm/dd/yy(end)' you suggest me).
3. A sequential int 1..n -indexRow-
The third is a join ds using the date from the first ds with the secuencial date of the second in a full outern join (this is because I need to have a full date range, like in the case i want to select first 6 months of x year but there is only data from 2nd to 4th)
So, for my chart, i use the groupRow for my category series, and enabling grouping.
Everything ok till here.
The problem is that, besides grouping with the groupRow, I have to group by series (using the titleRow mentioned before), and display the chart with the data sorted by date.
When using the optional Y series grouping on the titleRow, the data sorting function from the group and sorting dialog becomes unavailable, and leaving it that way I get a wicked sorted data display (like 01/01/10-01/31/10, 04/01/10-04/30/10, 02/01/10-02/28/10)
This is what I get with week grouping (date format dd/mm/yy), optional Y series grouping on the titleRow
mwilliams
arod,
Is there any way you can make a quick recreation of this with the sample database and a scripted date dataSet showing how you've set everything up. This way I can run it and see if I can make the changes. I've seen that some of the sorting options are disabled when optional y-series grouping is set. I've asked others to request an enhancement for this to not happen, so you might try that as well, but for now, if you can recreate the issue, I'll see if I can help!
arod
So much thanks for your help Michael,
I've found my workaround. Instead of creating a range text row, I made a date one with the first day in range. Group using it, and sorting trough it too. Then, update the axis labels in the beforeDrawAxisLabel event, that did the trick!
mwilliams
Awesome! Glad you got it working! Let us know whenever you have questions!