web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Calculating Average value of a number of duration Opportunity fields

(0) ShareShare
ReportReport
Posted on by

We have a requirement to measure the time duration from a new Opportunity created to Close, across all Opportunities, then to average the time duration from all opportunities and report on this, plugging these into Goals and Metrics so the Sales manager is notified of Opportunities still open, over the average time.


I have managed to get ~80% through without coding, adding a new entity called Duration, with whole number "duration" fields calculated in a workflow using "Created On" and "Actual Close date" as start and due dates, updating a new Duration field in the Opportunity using the duration calculation, which provides the number of days between created on and close date.

I tried to do something similar creating a new entity to store a "Sum" value of all days, so the workflow would "increment" the day value in a separate entity field, each time a new Opportunity was closed, then adding another field to calculate the average, which I could then dashboard and use with Goals and measures.

I came across an issue where linking the new custom entity as an N:1 from Opportunity to "New Entity", allows  updating the fields in the new entity from an Opportunity workflow, but when running the workflow it consistently returns field not found. I can display the field in an advanced find and on a new entity form, and can map fields between the entities using the relationship.

I guess my first question is - I am over engineering this, is there a simpler way to achieve my original goals with the latest update to CRM 2015, using Calculated fields for example?

If not, any thoughts as to how we may achieve the above without coding, as I'm not quite there on the coding front yet....


Thank you for your help in advance...

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Calculating Average value of a number of duration Opportunity fields

    Just seen the details of our organizations Update 1 for CRM 2015, there's DIFFINDAYS for difference in days in calculated fields, and an AVG for rollup fields, so it looks like we will be able to remove the custom entity and workflow activities, and use the new built in functionality of Update 1!.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans