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)
Count of Aggregrated data
my_birt
Hi All,
I am new to BIRT reports designing and I desperately need your help. I have connected to a ms-sql database and got my required information.
Now I want to aggregrate a string field and get the count of each occurrence
Example:
my data
Netcool Omnibus
Tivoli
Impact
Netcool Omnibus
TBSM
Precision
Proviso
Impact
Impact
TBSM
Precision
Tivoli
Webtop
Netcool Omnibus
I want to display this data as
Product Occurrence
Netcoo Omnibus 3
Impact 3
TBSM 2
Webtop 1
Tivoli 2
Precision 2
Proviso 1
hope this example is clear. Please help me out.
Thanks,
Srinivas.
Find more posts tagged with
Comments
mwilliams
Hi Srinivas,
You'll want to group your table by Product, add a second column to the table, put an aggregation in the group header next to the Product data item with an aggregation of COUNT, and delete the detail row out of the middle. This should do it. Let me know if you have questions.
my_birt
Hello,
Thanks for responding. But I am not able to reproduce the steps suggested by you.
Here I am explaining what I did:
in Data Sets, under Computed Columns, added a new column with Aggregation field set to Count.
When I checked the Preview results, it is displaying total number of entries.
Can you please guide me with exact steps please.
Thanks in advance,
Srinivas.
mwilliams
Srinivas,
You'll have to create a table in your report, first, with 2 columns and a detail row bound to your dataSet. No need for a computed column. You go to the group tab in the property editor when you have your table selected. Add a new group on product. This creates a group header and footer row. You then drag an aggregation item from the palette to the header row's second column. In the pop up editor for the aggregation, choose the aggregation of COUNT and be sure that the group level is what you're aggregating over. This should be the default. Then, run the report. It should show your product with the count of occurances next to it. Let me know if you have issues.
my_birt
Hello William,
I think I am missing a step here. I created a table with two columns. In first column added Products field to my table. Then selected Groups tab under Property editor and added the Products under Key Expression.
I dont see any popup coming up to change the aggregration to count. I think this should be the final step.
Please let me know what configuration step I missed.
Thanks,
Srinivas
mwilliams
Srinivas,
The group on field under the group name needs to be your product field in your group editor. The second column of the table needs to contain an aggregation report item from your palette. Within the aggregation editor pop up you get when you drop the aggregation into the table, you'll choose the aggregation type of COUNT.
What version of BIRT are you using? I'll make a quick example with the sample database.
my_birt
Thanks a Lot Williams...
I could figure out what was my mistake and now I got the elements aggregrated
Is this kind of aggregration also possible with bar charts as well ? Please guide me with the steps to do it
I really appreciate all your efforts to help me with this.
Thanks,
Srinivas.
mwilliams
Srinivas,
Yes, you can do grouping and aggregations within the charts as well. If you use BIRT 2.5.x, you can use your table as the data for your chart and the aggregations you made within your table are available for use.
my_birt
Hello Michael,
I was occupied with some other stuff here and today I started continuing with it. I downloaded BIRT v2.5.
Can you tell me the procedure to use my table data into Charts. Is it possible to hide the table while viewing the results?
Thanks,
Srinivas.
mwilliams
Srinivas,
If you name your table in the general tab of the property editor, you can choose your table name from under the drop down for using a report item for you data in your chart editor, rather than a dataSet. You'll then be able to use the groupings and aggregations that are in your table. If you don't want to see the table, you just need to set the visibility expression to true and it will not show, but the chart still will. The chart just has to be under the table for this to work, not in it.
Let me know if you have questions.
my_birt
Thanks for the Great Support Michael.
I am able to see the charts with my requirements now and the chart looks great. I was able to do the same in 2.2.1 BIRT version also
I have one more query with this. I have multiple bars coming up for each entry
for example:
If my data is
Netcool 2
Tivili 4
TBSM 1
etc
Then in my chart I am getting 2 bars for Netcool, 4 bars for Tivili and 1 bar for TBSM.
Can I get one Solid bar for each of these entries?
Thanks a lot again for ur help.
Srinivas.
my_birt
No problem I could figure it out.
Can you tell me how to increase the x and y axis and move the legends to extreme right ?
mwilliams
Srinivas,
Can you explain what you mean by increasing the axis? Also, the default should be to put the legend on the right side. Are you not seeing this?