function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nathan Hedman-Copp 2Nathan Hedman-Copp 2 

How to best track opportunities by their products' "active" dates for a report?

Simply stated, my goal is to write an accrual report that lists all closed/won opportunities by each month (with each month including in an opportunity only if any of its products are active during that month). I do have a field for the number of days an opportunity runs (product end date - start date) as well as the average price per day (total opp price / # of days), but I can't figure out how to accomodate the opportunities which run for mulitple months. Hopefully this explanation makes sense. So:

1) How do I create a field that indicates the sum of the total months/dates that an opportunity and its products cover? I figured I'd use that field to sort active opps in the report, but should I be heading in a different direction? 

2) Once I know the total dates/months, how do I split an opportunity within a report to reflect the $ spent per each month? For example, let's say there's an opportunity with a total price $1500 has a product that runs 5 days in January and 10 in February. How do I correctly note that the opp is active in January/February and show that the opp is credited $500 for January and $1000 for February?