Calculated and Roll-Up Fields in Power Platform
|Simple Field||Contains data that is not based on a formula.||First name, Birthday, Email, Price, Status|
|Calculated Field||Contains calculations that use fields from the current entity or related parent entities.||Full name: First name + Last Name Weighted Revenue: Estimated revenue x opportunity probability|
|Rollup Field||Contains an aggregate value computed from the records related to a record, or a value computed over a hierarchy.||Potential revenue: Sum of revenues of all open opportunities for a given account. Total open cases: The count of all open cases for a given customer|
|Single Line of Text||X||X|
|Multiple Lines of Text||X|
|Option Set/Two Options||X||X|
Common Characteristics and LimitationsCalculated and rollup attributes share some common elements and characteristics:
- They’re read-only.
- They’re not specific to the user. The calculation is performed using a system user account, so the values may be based on records that the user doesn’t otherwise have privileges to view, such as attributes that have field-level security enabled.
- Rollup and calculated fields are complementary to each other. You can use a rollup field as a part of the calculated field, and vice versa.
- Calculated and rollup fields do not trigger workflows (including Microsoft Flows) or plug-ins, nor do they trigger duplicate detection rules. Changes to the fields are not captured in audit.
- Modifiedby and modifiedon fields are not affected by calculated or rollup fields.
Want to keep
CloudSwyft Global Systems, Inc. online course,
Dynamics 365: Using Power Platform Applications
LimitationsYou should be aware of certain conditions and limitations when working with calculated fields:
- Calculations are not stored valuesb – the calculation is performed during the retrieve proces (i.e. values will not be updated on a form until the form is refreshed). If users expect to see real-time changes as they edit data involved in the calculation, calculated fields would not be a good solution.
- A calculated field cannot directly or indirectly refer to itself.
- You can’t sort on calculated fields that use logical (e.g. address field), related record, or other calculated fields.
- Views and visualisations can use up to 10 unique calculated fields.
Rollup FieldsRollup fields are designed to help users obtain additional data insights by calculating key business metrics. A rollup field contains an aggregate value computed over the records related to a specified record, such as open opportunities of an account. You can also aggregate data from the activities directly related to a record, such as emails and appointments, and activities indirectly related to a record via the Activity Party entity (for example, meeting attendees).In more complex scenarios, you can aggregate data over the hierarchy of records. For example, if an account has a hierarchical self-relationship defined, you can calculate revenue across all sub-accounts in a hierarchy.Definition of a rollup field includes the following:
- Source entity section, where you specify the entity for which the rollup field is defined and whether you aggregate over a hierarchy. You can add filters with multiple conditions to specify the records in the hierarchy you want to use for rollup.
- Related entity section, where you specify the entity over which you aggregate. This section is optional when you choose to rollup over the hierarchy on the source entity. You can add filters with multiple conditions to specify which related records to use in the calculation. For example, you can include the revenue from only the open opportunities where an annual revenue is greater than $1000.
- Aggregate section, where you specify the metric you want to compute. You can choose available aggregate functions, such as SUM, COUNT, MIN, MAX, or AVG.
Updating Rollup ValuesRollup fields are calculated by scheduled system jobs that run asynchronously in the background. The jobs can be viewed and managed by an administrator. There are two types of system jobs:
- Mass recalculation that runs once per rollup field 12 hours after you created or updated a rollup field.
- Incremental recalculation job that runs per entity and recalculates all rollup fields for that entity by processing the records that were created, updated or deleted since the last recalculation. The default maximum recurrence setting is one hour.
LimitationsYou should be aware of certain conditions and limitations when working with rollup fields:
- A rollup over a rollup field is not supported.
- A rollup can’t reference a calculated field that uses another calculated field, even if all the fields of the other calculated field are on the current entity.
- The rollup can only apply filters to the source entity or related entities, simple fields, or non-complex calculated fields.
- Rollup fields are updated on schedule and not in real time. If a user has sufficient privileges, they can force manual recalculation of a rollup field in user interface.
- Rollup fields are limited to 10 per entity and 100 per organisation.
- Function NOW() can’t be used in conditions, but a calculated field with the value of NOW() can.
- You can use calculated fields as a simple alternative to Quick View forms to make related record values available. For example, a contact may include calculated field Office Phone that is set to the parent account’s telephone number.
- To avoid potential data overflow when performing rollup of a whole number field (for example, File Size), use decimal data type with precision 0 for the target rollup field.
Dynamics 365: Using Power Platform Applications
Our purpose is to transform access to education.
We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.
We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.