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)

Calculated vs. Rollup vs. Business Rules to calculate

(0) ShareShare
ReportReport
Posted on by

Does anyone know of a comparison matrix that lists the considerations/implications of calculated fields vs. rollup fields, vs using business rules to calculate?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sean K Profile Picture
    1,537 on at
    RE: Calculated vs. Rollup vs. Business Rules to calculate

    Hi Debra,

    I'm not aware of a matrix, it depends on the requirements. There are some good comparisons of calculated fields vs rollup fields (including limitations of both):

    msdn.microsoft.com/.../dn817863.aspx

    www.powerobjects.com/.../enhancements-to-calculated-fields-and-rollup-fields-in-crm-2015

    Whereas business rules can be used in place of Javascript/plugins (sometimes!).

    Regards,

    Sean

  • Frank Lee Profile Picture
    4,617 on at
    RE: Calculated vs. Rollup vs. Business Rules to calculate

    I'm unaware of a comparison matrix of the three.  Each has their pros and con.  I would review the following links and the limitation section and post specifics questions for more discussion:

    msdn.microsoft.com/.../dn817863.aspx

    technet.microsoft.com/.../dn531086.aspx

  • Community Member Profile Picture
    on at
    RE: Calculated vs. Rollup vs. Business Rules to calculate

    One thing that I think is often overlooked is considering how often a field is updated versus how often it will be read.

    For example consider a scenario where you have some kind of short-lived record (lead, opportunity, sales order, event booking, project milestone, service incident) that you enter some values for. You have various options to calculate something from those values: calculated fields, maybe business rules or more probably workflows and plugins.

    Consider how often the values will be entered or updated (in many cases only once, during record creation, or possibly at record closure). How often are those calculated values read? Don't forget "reading" includes any time those fields are shown as a column in a view, or used to aggregate a value shown in a chart.

    If you have values that are typically entered once, but the calculated result will be used to display a chart of thousands of records on a dashboard viewed by hundreds of users, dozens of times every day, then I would suggest you use something like a workflow or plugin to calculate the result and store it in the database. Retrieval and aggregation becomes trivial then, compared to calculating for every record at run-time.

    If the values change frequently, and the resulting calculation is maybe only used to see the answer on the record form, then a calculated field might make more sense (the extra effort of calculating on the fly is trivial for a single record with simple calculations).

  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at
    RE: Calculated vs. Rollup vs. Business Rules to calculate

    Hi Debra

    I Just knocked this up for you hope It helps :)

    [View:http://www.crmconsultants.co.uk/business-rules-vs-rollup-fields-vs-calculated-fields/:750:50]

    Business Rules

    https://technet.microsoft.com/en-us/library/dn531086.aspx

     

    Rollup Fields

    https://technet.microsoft.com/en-us/library/dn832162.aspx

     

    Calculated Fields

    https://technet.microsoft.com/en-us/library/dn832103.aspx

     

    Feature Trigger Execution Client / Server Scope Conditions Fields Functions Limits Usage

    Business Rules

     

    On LoadOn Change

    Synchrounous / Real Time

    Execution order:1)System JavaScripts 2)Custom Javascript        3) Then Business Rules

    Client/ Server Entity / All Forms / Specific Forms And / OR, not a mixure All Fields on the form body

    Show Error Message

    Set Field

    Set Business Required

    Set Visibility

    Set Default Value

    Lock / Unlock Field

    Fields updated through Business Rules do not trigger the fields on change event of JavaScript. Reducing potential of infinite loop. Perform field validations and apply field logic to improve user input and experience
    Rollup Fields On Save / Every 1-12 hours / When User Presses Rollup Refresh Button

    Asynchronous / Every 1-12 hours

    Rollups are calculated by scheduled system jobs Settings > System Jobs > View > Recurring System Jobs. System Job type: Mass Calculate Rollup Field or Calculate Rollup Field

    Server Related Entity / Parent Child Relationship Upto 1 Level Deep And / OR, not a mixure

    Whole Number

    Decimal

    Currency

    Date

    SUM / MAX / MIN / COUNT / AVG Cannot use other Calculated or Rollup fields as part of a rollup. Aggregate calculations of child entities. The difference between Calculated Fields is Rollup fields are not virtual, they are physical attributes. Such as no. of open opportunities, activities, revenue, etc.

    Calculated Fields

     

    OnSave Synchronous Server Entity/ Parent Child Relationship Upto1 Level Deep AND or OR , Not a mix of both
    • Single line of text
    • Option Set
    • Two Options
    • Whole Number
    • Decimal Number
    • Currency
    • Date and Time

    ADDHOURS, ADDDAYS, ADDWEEKS,

    ADDMONTHS,ADDYEARS,

    SUBTRACTHOURS,SUBTRACTDAYS,

    SUBTRACTWEEKS, SUBTRACTMONTHS,

    SUBTRACTYEARS,DIFFINDAYS, DIFFINHOURS,

    DIFFINMINUTES,DIFFINMONTHS,DIFFINWEEKS,

    DIFFINYEARS,CONCAT,TRIMLEFT, and TRIMRIGHT.

    Two calculated fields cannot reference each other in their formulas

    Floating point numbers cannot be used in calculated fields.

    Won’t trigger workflow updates

    Fields are virtual /not stored at the database level

    Ability to populate a field with simple calculations based on other values and conditions on the form in a real time manner.   This alleviates the need for JavaScript in fairly straight forward scenarios such as adding days or months to a date, or adding or subtracting fields on the same entity.

    Calculated fields can calculate based on other fields, including rollup fields and other calculated fields.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans