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)
Grouping on an aggregated value
wagner1845
Hello everybody.
I have a table with two groups. The inner group uses an aggregation with a filter condition to get some special information. And in the outer group I'd like to group on that aggregation.
But if I execute the report I get some strange errors.
I'm using BIRT 2.6.1.
A sample report, build on the BIRT sample database, is attached to demonstrade the problem.
I'm not sure if this is a bug in BIRT or if I've made any mistakes. I would enjoy if somebody of the more expierenced users could verify it.
Thanks a lot.
Christian
Find more posts tagged with
Comments
mwilliams
I don't know that you're ever going to be able to aggregate over an inner group and then use that aggregation to group over the entire table. The inner group can't exist until the outer group is determined because the values in the inner group change based on the outer grouping. What are you trying to do exactly? Maybe I can suggest something that will work for you.
wagner1845
Hi Michael,
thanks for the quick reply.
Ok. The datasource I use (Java objects) provide the data not in one record for each object. Rather each attribute-value-pair will be offered separately in individual records, like that:
OBJID ATTRID ATTR VALUE
1002 1 Lastname Murphy
1002 2 Firstname Diane
1002 3 Jobtitle President
1002 4 Email dmurphy@classicmodelcars.com
1056 1 Lastname Patterson
1056 2 Firstname Mary
1056 3 Jobtitle VP Sales
1056 4 Email mpatterso@classicmodelcars.com
In the most reports these data will be shown simply as a list grouped by OBJID. But in some reports the data should be shown as a table with the attributes side by side.
Ok. I know, you can do that by using cubes and cross tabs. But cubes and cross tabs are not easy to use, they are a little bit slow and you have not so much control.
Therefore I tried to use a simple table with grouping on OBJID. I added some aggregation with filter to separate the values. (Like that: Attr_LastName=FIRST(row["VALUE"]) with filter row["ATTRID"]==1) In that way I separated each attribute in a different data object which I can use at group level. The detailed row and the group footer won't be use, so I deleted them. Now I have my plain table with the data side by side. But if I try to build some more groups, e.g a group by jobtitle, unfortunately I'm running into trouble.
I'm very curious about your advice.
Best regards.
Christian
mwilliams
Christian,
So, all you're trying to do is display the information of a person in an aggregation? Can you show me an example of what your data would look like and what you want the final result to look like?
wagner1845
Hello Michael,
here is the example report. The query simulates the way I get the data. The table is used to get the data side by side through grouping and aggregation. The next step should be a top level group by jobtitle. That's all I need.
Best regards
Christian
mwilliams
Christian,
Take a look at the table I added to your report. I used an embedded table, grouping, and a filter to do what you're wanting. Let me know if you have questions.
ANNKRUSE
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="70539" data-time="1290184357" data-date="19 November 2010 - 09:32 AM"><p>
Christian,<br />
<br />
Take a look at the table I added to your report. I used an embedded table, grouping, and a filter to do what you're wanting. Let me know if you have questions.<br /></p></blockquote>
<br />
I am having a similar problem. I am confined to 2.6<br />
<br />
Group 1 = car model Group 2 = type Group 3 = location<br />
<br />
cm 1 ct 1 loc 2<br />
ct 1 loc 1<br />
cm1 ct 2 loc 1<br />
<br />
I do not want to show Car model until the Car model changes. Car model repeats when car type changes. Please help I have tried many ways.
mwilliams
Can you attach your design? Or can you reproduce the issue you're talking about with the sample database? Thanks.
ANNKRUSE
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="100306" data-time="1336754451" data-date="11 May 2012 - 09:40 AM"><p>
Can you attach your design? Or can you reproduce the issue you're talking about with the sample database? Thanks.<br /></p></blockquote>
Thank you so much for your response. I played around with putting in a grid and setting columns until I got the results I needed. You are awesome to answer!<br />
<br />
Thanks
mwilliams
Great! Glad you got it working! Let us know whenever you have questions!