Skip to main content



      Home
Home » Archived » BIRT » Aggregating data from two different data sets
Aggregating data from two different data sets [message #716251] Tue, 16 August 2011 15:24 Go to next message
Eclipse UserFriend
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 15:47 Go to previous messageGo to next message
Eclipse UserFriend
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 16:32 Go to previous message
Eclipse UserFriend
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: Tue Jul 15 06:50:57 EDT 2025

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

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

Back to the top