Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

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

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
wilpitz
Asked:
wilpitz
1 Solution
 
mlmccCommented:
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
 
wilpitzAuthor Commented:
That worked!!!!
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now