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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula to get Changed information

Status
Not open for further replies.

NavyFederalDetta

Technical User
Mar 22, 2006
16
I need a formula that tells me how much a UnitPrice has changed from one month to the next to show if we've added cost to an asset in our database.

Example,
UnitPrice change from July 1, 2007 to July 31, 2007

or

UnitPrice change in LastFullMonth.

How do I write the formula for "change"?

Thank you!!!
 
Unless the database you are reporting against logs this change, you are SOL.

Crystal does not report against what a value of a field used to be, nor can it store a value for a month and compare it to the value today.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
so, let's say my database stores the change, how would I word the formula?

Thanks!!
 
Depends on the table. Lets assume the old price is in the same table, on on another history table you can link to:

{NewPriceField}-{OldPriceField}

On the other hand if the price history is all in one table with different records based on the chronological date, use this formula:

Not OnLastRecord;
{Pricefield}-Next({PriceField})

You could use previous() instead of next in the above formula depending upon the sort of your report.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top