Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help with calculation on formula for month period 1

Status
Not open for further replies.
Feb 4, 2009
137
US
I created a report with parameters [BeginDate] and [EndDate]
For instance data I run for month : 3/1/10 - 3/31/10
Results in group footer grouped by [Vaccine]

Vaccine Total

Dtap 110
IPV 200
MMR 50
etc..


The previous month: 2/1/10-2/28/10


Dtap 20
IPV 15
MMR 55
etc..


Then I would like to create a report combine them for a results:

Period: 3/1/10-3/31/10

Vaccine Total Previous Total

Dtap 110 20
IPV 200 15
MMR 50 55
etc..

Please help with this formula...
I'm so appreciated for you help.
Thank you very much
 
Set up your record selection formula to include the entire range for the two months, or set it up like this if you want to select only one month by parameter:

{table.date} >= dateadd("m",-1,{?StartDate}) to {?EndDate}

Then insert a crosstab in the report footer that uses {table.vaccine} as the row, {table.date} (group options->on change of month->descending order) as the column, and whatever summary you are using. If you wish, you can change the column labels to say Total and Previous Month.

-LB
 
Awesome, thanks LB for your quick response. I use 2 months in my record selection formula and it works like charm.
Thanks again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top