Skip to content

Commit d612195

Browse files
authored
Merge pull request #9175 from MicrosoftDocs/dhsin-update-rollup-columns
Update rollup columns article for expanded total number of rollup columns supported
2 parents 460b99e + f0f2590 commit d612195

File tree

2 files changed

+38
-24
lines changed

2 files changed

+38
-24
lines changed

powerapps-docs/maker/data-platform/define-rollup-fields.md

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Define rollup columns with Power Apps | MicrosoftDocs"
3-
description: "Learn how to define rollup columns"
4-
ms.date: 06/21/2022
3+
description: "Learn how to define rollup columns."
4+
ms.date: 02/15/2024
55
ms.topic: "conceptual"
66
applies_to:
77
- "Dynamics 365 (online)"
@@ -23,12 +23,12 @@ In more complex scenarios, you can aggregate data over the hierarchy of rows. As
2323

2424
## Rollup columns benefits and capabilities
2525

26-
The benefits and capabilities of rollup columns include the following:
26+
The benefits and capabilities of rollup columns include:
2727

2828
- Visual editing is easy. You can create rollup columns by using the Column Editor, just like you do when you create a regular column.
2929
- Wide selection of aggregate functions. You can aggregate data by using the following functions: `SUM`, `COUNT`, `MIN`, `MAX` and `AVG`.
3030
- Full filter support for aggregation. You can set various filters for the source table or related table while setting multiple conditions.
31-
- Seamless integration with the user interface. You can include the rollup columns in forms, views, charts and reports.
31+
- Seamless integration with the user interface. You can include the rollup columns in forms, views, charts, and reports.
3232
- Rollup columns are solution components. You can easily transport the rollup columns as components between environments and distribute them in solutions.
3333
- Rollup columns and the calculated columns are complementary to each other. You can use a rollup column as a part of the calculated column, and vice versa.
3434
- You can configure rollup columns to use custom controls.
@@ -73,30 +73,30 @@ To view rollup jobs:
7373

7474
### Mass Calculate Rollup Field
7575

76-
Mass Calculate Rollup Field is a recurring job, created for each rollup column. It runs once, after you create or update a rollup column. The job recalculates the specified rollup column value in all existing records that contain this column. By default, the job will run 12 hours after you have created or updated a column. When the column is modified, the job resets to run again in 12 hours after the update. The 12-hour delay is needed to assure that the Mass Calculate Rollup Field runs during the non-operational hours of the environment.
76+
Mass Calculate Rollup Field is a recurring job, created for each rollup column. It runs once, after you create or update a rollup column. The job recalculates the specified rollup column value in all existing records that contain this column. By default, the job will run 12 hours after you have created or updated a column. When the column is modified, the job resets to run again in 12 hours after the update. The 12-hour delay is needed to assure that the Mass Calculate Rollup Field runs during the nonoperational hours of the environment.
7777

78-
We recommend that an administrator adjusts the start time of a Mass Calculate Rollup Field job after the rollup column is created or modified, in such a way that it runs during non-operational hours. For example, midnight would be a good time to run the job to assure efficient processing of the rollup columns.
78+
We recommend that an administrator adjusts the start time of a Mass Calculate Rollup Field job after the rollup column is created or modified, in such a way that it runs during nonoperational hours. For example, midnight would be a good time to run the job to assure efficient processing of the rollup columns.
7979

8080
Notice that, when the situation occurs where the rollup column is never updated, the Mass Calculate Rollup Field job won't run again for that column until after 10 years have passed. This behavior is by design. When there aren't any updates in the underlying columns associated with the rollup field, there isn't any reason to run the job more frequently.
8181

8282

8383
### Calculate Rollup Column
8484

85-
**Calculate Rollup Field** is a recurring job that does incremental calculations of all rollup columns in the existing rows for a specified table. There is only one **Calculate Rollup Field** job per table. The incremental calculations mean that the **Calculate Rollup Field** job processes the rows that were created, updated, or deleted after the last **Mass Calculate Rollup Field** job finished execution. The default minimum recurrence setting is one hour. The job is automatically created when the first rollup column on a table is created and deleted when the last rollup column is deleted.
85+
**Calculate Rollup Field** is a recurring job that does incremental calculations of all rollup columns in the existing rows for a specified table. There's only one **Calculate Rollup Field** job per table. The incremental calculations mean that the **Calculate Rollup Field** job processes the rows that were created, updated, or deleted after the last **Mass Calculate Rollup Field** job finished execution. The default minimum recurrence setting is one hour. The job is automatically created when the first rollup column on a table is created and deleted when the last rollup column is deleted.
8686

8787
## Online recalculation option
88-
The rollup column on the form displays a calculator image, rollup value, and the time of the last calculation. To recaclulate, select the calculator image, and then select the **Recalculate** button that appears.
88+
The rollup column on the form displays a calculator image, rollup value, and the time of the last calculation. To recalculate, select the calculator image, and then select the **Recalculate** button that appears.
8989

9090
> [!div class="mx-imgBorder"]
9191
> ![Rollup column on the account form.](media/rollup-field-on-account-form.png)
9292
9393

9494
There are a few considerations you should keep in mind when using the online recalculation option (manual refresh on the form):
9595

96-
- You must have Write privileges on the table and Write access rights on the source row on which you are requesting the Refresh. For example, if you are calculating the estimated revenue from the open opportunities of an account, you don't have to have Write privileges on the opportunity table, only on the account table.
96+
- You must have Write privileges on the table and Write access rights on the source row on which you're requesting the Refresh. For example, if you're calculating the estimated revenue from the open opportunities of an account, you don't have to have Write privileges on the opportunity table, only on the account table.
9797
- This option is only available in the online mode. You can't use it while working offline.
98-
- The maximum number of rows during the rollup refresh is limited to 50,000 rows. In case of the hierarchical rollup, this applies to the related rows across the hierarchy. If the limit is exceeded, you see an error message: *Calculations can't be performed online because the calculation limit of 50,000 related rows has been reached.* This limit does not apply when the rollup is automatically recalculated by the system jobs.
99-
- The maximum hierarchy depth is limited to 10 for the source row. If the limit is exceeded, you see an error message: *Calculations can't be performed online because the hierarchy depth limit of 10 for the source row has been reached.* This limit does not apply when the rollup is automatically recalculated by the system jobs.
98+
- The maximum number of rows during the rollup refresh is limited to 50,000 rows. In case of the hierarchical rollup, this applies to the related rows across the hierarchy. If the limit is exceeded, you see an error message: *Calculations can't be performed online because the calculation limit of 50,000 related rows has been reached.* This limit doesn't apply when the rollup is automatically recalculated by the system jobs.
99+
- The maximum hierarchy depth is limited to 10 for the source row. If the limit is exceeded, you see an error message: *Calculations can't be performed online because the hierarchy depth limit of 10 for the source row has been reached.* This limit doesn't apply when the rollup is automatically recalculated by the system jobs.
100100

101101
## Modify rollup job recurrence
102102

@@ -114,17 +114,17 @@ For the **Calculate Rollup Field** job, the available selections are: **Modify R
114114

115115
## Examples
116116

117-
Let's take a look at several rollup column examples. We'll aggregate data for a row from the related rows with and without using a hierarchy. We'll also aggregate data for a row from related activities and activities indirectly related to a row via the ActivityParty table. In each example, we define the rollup column by using the Column Editor. To open the Column Editor, open solution explorer and expand **Components** > **Tables**. Select the table you want and select **Columns**. Choose **New**. In the editor, provide the required information for the column, including the **Column Type** and **Data Type**. In the **Column Type**, select **Rollup**, after you have selected the data type. The data types include decimal or whole numbers, currency, and date/time. Choose the **Edit** button next to the **Column Type**. This takes you to the rollup column definition editor. The rollup column definition consists of three sections: **Source table**, **Related table** and **Aggregation**.
117+
Let's take a look at several rollup column examples. We'll aggregate data for a row from the related rows with and without using a hierarchy. We'll also aggregate data for a row from related activities and activities indirectly related to a row via the ActivityParty table. In each example, we define the rollup column by using the Column Editor. To open the Column Editor, open solution explorer and expand **Components** > **Tables**. Select the table you want and select **Columns**. Choose **New**. In the editor, provide the required information for the column, including the **Column Type** and **Data Type**. In the **Column Type**, select **Rollup**, after you have selected the data type. The data types include decimal or whole numbers, currency, and date/time. Choose the **Edit** button next to the **Column Type**. This takes you to the rollup column definition editor. The rollup column definition consists of three sections: **Source table**, **Related table, and **Aggregation**.
118118

119119
- In the **Source table** section, you specify the table for which the rollup column is defined and whether or not you aggregate over a hierarchy. You can add filters with multiple conditions to specify the rows in the hierarchy you want to use for rollup.
120120

121-
- In the **Related table** section, you specify the table over which you aggregate. This section is optional when you choose to rollup over the hierarchy on the source table. You can add filters with multiple conditions to specify which related rows to use in the calculation. For example, you include the revenue from the open opportunities with an annual revenue greater than $1000.
121+
- In the **Related table** section, you specify the table over which you aggregate. This section is optional when you choose to rollup over the hierarchy on the source table. You can add filters with multiple conditions to specify which related rows to use in the calculation. For example, you include the revenue from the open opportunities with an annual revenue greater than $1,000.
122122

123-
- In the **Aggregate** section, you specify the metric you want to compute. You can choose available aggregate functions, such as SUM, COUNT, MIN, MAX or AVG.
123+
- In the **Aggregate** section, you specify the metric you want to compute. You can choose available aggregate functions, such as SUM, COUNT, MIN, MAX, or AVG.
124124

125125
### Aggregate data for a row from related rows
126126

127-
In this example, a hierarchy is not used. The total estimated revenue is calculated for an account, from the related open opportunities.
127+
In this example, a hierarchy isn't used. The total estimated revenue is calculated for an account, from the related open opportunities.
128128

129129
![Aggregate the estimated revenue for an account.](media/rollup-field-no-hierarchy.png)
130130

@@ -142,7 +142,7 @@ In this example, we calculate the total estimated revenue of open opportunities
142142

143143
### Aggregate data for a row from all related activities
144144

145-
In this example, we calculate the total time spent and billed from all activities related to an account. This may include time spent on the phone, at appointments, or on custom activities.
145+
In this example, we calculate the total time spent and billed from all activities related to an account. This might include time spent on the phone, at appointments, or on custom activities.
146146

147147
In earlier releases, you could define a rollup column for an individual activity, such as a phone call, fax, or appointment. But, to achieve the result of the example shown below, you had to total the data by using the calculated columns. Now, you can do it all in one step by defining one rollup column for the Activity table.
148148

@@ -169,21 +169,35 @@ The following example shows how to calculate an average estimated revenue from r
169169

170170
<a name="BKMK_considerations"></a>
171171

172-
## Rollup column considerations
172+
## Rollup column considerations
173173

174174
You should be aware of certain conditions and restrictions when working with rollup columns:
175175

176-
- You can define a maximum of 100 rollup columns for the organization and up to 10 rollup columns per table.
176+
- You can define a maximum of 200 rollup columns for the environment and up to 50 rollup columns per table. The current default values and previous maximum are 100 per environment and 10 per table. More information: [Define the maximum number of rollup columns in an environment or table](#define-the-maximum-number-of-rollup-columns-in-an-environment-or-table)
177177
- A workflow can't be triggered by the rollup column updates.
178-
- A workflow wait condition cannot use a rollup column.
179-
- A rollup over the rollup column is not supported.
178+
- A workflow wait condition can't use a rollup column.
179+
- A rollup over the rollup column isn't supported.
180180
- A rollup can't reference a calculated column that uses another calculated column, even if all the columns of the other calculated column are on the current table.
181-
- The rollup can only apply filters to the source table or related tables, simple columns or non-complex calculated columns.
181+
- The rollup can only apply filters to the source table or related tables, simple columns or noncomplex calculated columns.
182182
- A rollup can be done only over related tables with the 1:N relationship. A rollup can't be done over the N:N relationships.
183183
- A rollup can't be done over the 1:N relationship for the Activity table or the Activity Party table.
184-
- The business rules, workflows or calculated columns always use the last calculated value of the rollup column.
184+
- The business rules, workflows, or calculated columns always use the last calculated value of the rollup column.
185185
- A rollup column is aggregated under the system user context. All users are able to see the same rollup column value. You can control the rollup column visibility with the column level security (FLS), by restricting who can access the rollup column. More information [Column level security to control access](/dynamics365/customer-engagement/admin/field-level-security).
186186

187+
### Define the maximum number of rollup columns in an environment or table
188+
189+
You can define a maximum of 200 rollup columns for the environment and up to 50 rollup columns per table. The current default values and previous maximums are 100 per environment and 10 per table.
190+
191+
To increase the maximums, follow these steps:
192+
193+
1. Go to Power Apps (make.powerapps.com), select **Table** on the left navigation pane, and then open the **Organization** table.
194+
1. Select the *n* **more** list, and then type *maxr* in the **Search** box. Select the **MaxRollupFieldsPerOrg** and **MaxRollupFieldsPerEntity** columns, and then select **Save**.
195+
:::image type="content" source="media/max-rollup-properties.png" alt-text="Select max rollup columns to increase values":::
196+
1. Change the values for **MaxRollupFieldsPerOrg** (up to 200) and **MaxRollupFieldsPerEntity** (up to 50) that you want.
197+
198+
> [!IMPORTANT]
199+
> Having more than 100 rollup columns for an environment might result in degraded performance of rollup columns and increased storage consumption.
200+
187201
### Precision rounding
188202

189203
If the precision of the aggregated column is greater than the precision of the rollup column, the aggregated column precision is rounded down to the precision of the rollup column, before the aggregation is performed. To illustrate this behavior, let's look at a specific example. Let's say that the rollup column on the account table, for calculating the total estimated revenue of the related opportunities, has a precision of two decimal points. The Est. Revenue column on the opportunity table is the aggregated column with the precision of four decimal points. In our example, the account has two related opportunities. The aggregated sum of the estimated revenue is calculated as follows:
@@ -196,12 +210,12 @@ As you can see, the precision rounding to two decimal points on the aggregated c
196210

197211
### Different behavior from Associated grids
198212

199-
Certain table forms, such as Account or Contact, out-of-the-box, contain the associated grids. For example, an Account form includes Contacts, Cases, Opportunities and other grids. Some of the rows shown in the Account form grids are directly related to the account row; others, indirectly, through the relationships with other rows. In comparison, the rollup column aggregation uses only direct relationships explicitly defined in the rollup column definition. No other relationships are considered. To illustrate the difference in behavior, let's look at the following example.
213+
Certain table forms, such as Account or Contact, out-of-the-box, contain the associated grids. For example, an Account form includes Contacts, Cases, Opportunities, and other grids. Some of the rows shown in the Account form grids are directly related to the account row; others, indirectly, through the relationships with other rows. In comparison, the rollup column aggregation uses only direct relationships explicitly defined in the rollup column definition. No other relationships are considered. To illustrate the difference in behavior, let's look at the following example.
200214

201215
1. The account A1 has a primary contact, P1. The case C1 is associated with the account A1 (C1.Customer column = A1) and the case C2 is associated with the contact P1 (C2.Customer column = P1).
202216
1. The **Cases** grid on the **Account** form for the A1 row, shows two cases, C1 and C2.
203217
1. The rollup column on the account table, called Total Number of Cases, is used to count the cases associated with the account.
204-
1. In the account rollup column definition, we specify the cases that have the Customer relationship with the account. After aggregation, the Total Number of Cases is equal to 1 (case C1). The case C2 is not included in the total, as it is directly related to the contact, not to the account, and can't be explicitly defined in the account rollup column definition. As a result, the total number of cases returned by rollup operation doesn't match the number of cases shown in the **Cases** grid.
218+
1. In the account rollup column definition, we specify the cases that have the Customer relationship with the account. After aggregation, the Total Number of Cases is equal to 1 (case C1). The case C2 isn't included in the total, as it's directly related to the contact, not to the account, and can't be explicitly defined in the account rollup column definition. As a result, the total number of cases returned by rollup operation doesn't match the number of cases shown in the **Cases** grid.
205219

206220
### See also
207221

Loading

0 commit comments

Comments
 (0)