Solved

Calculate return based on the min and max dates in a list

Posted on 2014-03-04
3
303 Views
Last Modified: 2014-03-05
I have a report that has a list of dates and prices and I need to calculate the return from the min and max dates in such a formula:

(Max Date Price/Min Date Price )-1
0
Comment
Question by:wilpitz
3 Comments
 
LVL 2

Expert Comment

by:sarvjita
ID: 39905979
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39906401
I am assuming you have the report grouped on the item and then have it sorted by date.

In the report header add a formula
WhilePrintingRecords;
Global NumberVar MinDatePrice;
""

Open in new window


In the product group header
WhilePrintingRecords;
Global NumberVar MinDatePrice;
MinDatePrice := {ProductPriceFIeld};
""

Open in new window


In the group footer
WhilePrintingRecords;
Global NumberVar MinDatePrice;
({ProductPriceFIeld} / MinDatePrice) - 1

Open in new window


mlmcc
0
 

Author Closing Comment

by:wilpitz
ID: 39906965
That worked!!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now