Rollup Column in Dataverse

📘 What is a Rollup Column in Dataverse?

A Rollup Column in Dataverse is a special type of column that automatically calculates aggregated values from related child records or from a hierarchical relationship within the same table. It uses background system jobs to compute values and does not update immediately on the form.

🟢 What Rollup Columns Can Calculate

  • SUM - Total of related values
  • COUNT - Number of related records
  • MIN / MAX - Lowest or highest value
  • AVG - Average of related records
  • Latest Date - Most recent related activity

🟡 Important Characteristics

  • Calculates using asynchronous jobs (not real-time)
  • Refreshes every 1 hour or when manually recalculated
  • Supports only numeric & date data types
  • Requires a related child table or self-hierarchy lookup

🛠️ How to Create a Rollup Column in Dataverse

  1. Open the table where you want to create the rollup field.
  2. Click on Add Column.
  3. Enter the column name and select a supported data type:
    Whole Number, Decimal, Currency, or Date.
  4. Scroll down to Column Behavior and change it to Rollup.
  5. Save the column. After saving, an Edit button appears next to the behavior.
  6. Click Edit - a configuration window opens.
  7. Configure your rollup logic:
    • Source Entity - your main table
    • Use Hierarchy - enable only if using parent-child lookup within same table
    • Add Related Entity - choose a child table (Required when hierarchy = No)
    • Aggregation - choose SUM, COUNT, MIN, MAX, or AVG
  8. Save and Publish the changes.
  9. Optionally, click Recalculate on the form to manually trigger the rollup.


To create a rollup column in Dataverse, follow these points:

• Open the table where you want the rollup field and click "Add Column."
• Choose a supported data type such as Whole Number, Decimal, Currency, or Date and Time.
• In the Column Behavior section, change the behavior from Simple to Rollup and save the column.
• After saving, click the Edit option to open the rollup designer.
• The Source Entity will automatically show the current table (e.g., Source: Org Owned).
• If "Use Hierarchy: No" is selected, Dataverse requires you to choose a related child table because rollup fields calculate values from child records.
• Click "Add related entity" and select a table that has a 1-to-many relationship with the source table.
• Configure the aggregation logic such as SUM, COUNT, MIN, MAX, or AVG (example: SUM of CalculatedCol).
• If no related entity is selected, Dataverse displays the error: "The related entity is empty. It must be provided when the source entity hierarchy isn't used for the rollup," which happens because rollup fields cannot aggregate values from the same table without hierarchy.
• Rollup fields have a limitation: they cannot aggregate values inside the same table unless a self-referencing parent lookup exists and hierarchy is enabled.
• Rollup fields only work with child tables (1:N relationships) or hierarchical parent-child records.
• If the table has no child table and no hierarchy lookup, you cannot use a rollup field to aggregate data from that same table.

⚠️ Notes

  • If you do not select a Related Entity, you will get the error: “The related entity is empty…”
  • Rollup cannot aggregate values inside the same table unless hierarchy is used.
  • Background jobs used:
    • Mass Calculate Rollup Field - recalculates all records (12 hours)
    • Calculate Rollup Field - incremental update (every hour)

📘 Rollup Column Background Jobs in Dataverse

Rollup columns in Dataverse run asynchronously using background jobs. These jobs calculate values for rollup fields either when the record is updated or during the scheduled recalculation. Since rollup fields do not update immediately, it is important to understand how to trigger and verify these jobs.

🛠️ How to View Rollup Jobs

To check rollup processing jobs:

  1. Go to Advanced Settings.
  2. Navigate to Settings ➝ System ➝ System Jobs.
  3. Change the view to All Rollup Fields Calculations.

Under this view, you will find two important job types:

1️⃣ Mass Calculate Rollup Field

This job runs automatically every 12 hours (or as configured) and recalculates all records for the rollup column. Use this when:

  • You created a new rollup column for the first time.
  • You need to refresh rollup values for all existing data.
  • You modified a rollup condition or relationship.

It performs a full recalculation on the entire dataset. This is useful but may take time in large tables.

2️⃣ Calculate Rollup Field

This job runs every 1 hour and calculates rollup fields incrementally. It updates only the records that have changed since the last calculation.

  • Triggered automatically when related records are created or updated.
  • Performs a smaller, incremental calculation.
  • Ensures the rollup field is refreshed without recalculating everything.


🟢 Summary of Both Jobs

Job Type Purpose
Mass Calculate Rollup Field Recalculates all records (full table refresh). Runs twice a day.
Calculate Rollup Field Updates only modified/affected records. Runs every hour.

🟢 Available Actions for Rollup Jobs

1️⃣ Resume

Used when a job is in a Paused or Waiting state. Clicking Resume restarts the job execution and allows Dataverse to continue calculating rollup values.

2️⃣ Cancel

Cancels the job immediately. Once cancelled, the job will not continue execution, and the rollup values will not be updated for this run. Useful when:

  • You no longer need the calculation
  • You created the rollup mistakenly
  • You want to recreate a fresh job

3️⃣ Postpone

This action delays the execution of the rollup job. Dataverse will run the job at a later time. This is useful when:

  • System load is high
  • You want rollup to calculate during low-traffic hours

4️⃣ Pause

Temporarily stops the rollup job. The job remains in the queue but does not execute until you manually choose Resume. Useful when:

  • You are making schema changes
  • You want to prevent rollup recalculations temporarily
  • You want to diagnose system performance issues

📝 Notes

  • Only users with appropriate permissions (System Admin / System Customizer) can control rollup jobs.
  • Paused or postponed jobs must be resumed manually.
  • Cancelling a job does not delete the rollup field; it stops only that execution run.

📝 Additional Points

  • You can manually recalculate a rollup field by clicking the Recalculate button on the record form (if enabled).
  • After triggering manual recalculation, Dataverse creates a new Calculate Rollup Field job.
  • There is a small cooldown period before you can recalculate again.
  • Rollup fields do not support same-table aggregation unless hierarchy lookup is used.

Comments

Popular posts from this blog

Part 1: Creating Code Apps in Power Apps - A step-by-step guide (with real errors I faced & how I fixed them)

Calling Microsoft Graph API from Power Automate Using Azure App Services – Step-by-Step Guide

Step-by-Step Guide: Power Automate Custom Connector Using Graph API from Azure App Service