Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Aggregating data from two different data sets
Aggregating data from two different data sets [message #716251] Tue, 16 August 2011 19:24 Go to next message
Rory  is currently offline Rory Friend
Messages: 7
Registered: July 2011
Junior Member
Hello,

I'm trying to create a sales report with extrapolated sales. I have two data sets, both have the same data source. I created a data set that just gives the number of business days into the month. I then have a data set that has the current months sales. I want to take the total of the months sales, which i got using an aggregation function, and divide it by the number of days into the month to get the average sales per day.

any help is appreciated.

Thanks
Re: Aggregating data from two different data sets [message #716264 is a reply to message #716251] Tue, 16 August 2011 19:47 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at the attached example that aggregates across two tables.

If you just want to call java to get the days in a month use an
expression like:

importPackage(Packages.java.util);
cal = new GregorianCalendar();
cal.setTime(new Date());
days = cal.getActualMaximum(Calendar.DAY_OF_MONTH);

Jason

On 8/16/2011 3:24 PM, Rory wrote:
> Hello,
>
> I'm trying to create a sales report with extrapolated sales. I have two
> data sets, both have the same data source. I created a data set that
> just gives the number of business days into the month. I then have a
> data set that has the current months sales. I want to take the total of
> the months sales, which i got using an aggregation function, and divide
> it by the number of days into the month to get the average sales per day.
> any help is appreciated.
>
> Thanks
Re: Aggregating data from two different data sets [message #716270 is a reply to message #716264] Tue, 16 August 2011 20:32 Go to previous message
Rory  is currently offline Rory Friend
Messages: 7
Registered: July 2011
Junior Member
It works Thank You. I'm new to using the script, but I was able to understand enough and get it to work.

Thanks
Previous Topic:Problem with the total page-function
Next Topic:Scripting and Report Engine
Goto Forum:
  


Current Time: Thu Mar 28 14:15:31 GMT 2024

Powered by FUDForum. Page generated in 0.01851 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top