Solved

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

Posted on 2014-03-04
3
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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