Aggregation in Model-Driven App views and subgrids

Aggregation in Model-Driven App views and subgrids

John PhillipsProduct Updates

First announced in 2022, the Power Apps Grid Control has seen continuous improvements, with the latest being the aggregation of data in views and subgrids.

What is the Power Apps Grid Control?

Designed to ultimately replace traditional read-only and editable Views and subgrids, the Power Apps Grid Control provides a modern data browsing experience, including infinite scrolling rather than paging through data and the ability to customise the visual appearance of columns for specific needs. The control can be used selectively across your model-driven apps in place of existing views and subgrids.

What does the new aggregation functionality do?

Currently in preview, this new feature allows a user to generate aggregation in real-time when browsing lists of records by adding an new option to the column header:

Aggregation in a Power Apps Grid Control

As you can see in the above screenshot, on certain field types, a new Totals option now appears, presenting an option to display an Average, Maximum, Minimum or Sum for the column. Once selected, the aggregation then appears at the bottom of the view or subgrid:

Average Aggregation

It is worth noting that this aggregation is only displayed for the current user and are only displayed temporarily – if the user navigates away from the view, the changes will be cleared.

How do I enable aggregation on a Power Apps Grid Control?

Depending on where you want to enable the aggregation, there are three methods:

Enabling aggregation on all Views

  1. Navigate to the Solution Explorer.
  2. Find the table you want to want to customise:
    Add Power Apps Grid Control to all Views
    Under the Controls tab, you may already have the Power Apps grid control showing, but if not, select Add Control and add it to the list of Controls.
  3. When the control is selected in the list, you will be presented with a scrollable list of options. Look for Enable aggregation (preview) and set it to Yes.
  4. Save and Publish your changes to the table.

Enabling aggregation for a single View

  1. In the Power Platform Maker Portal, find the table you wish to customise and select Views.
  2. Find the view you wish to add the aggregation feature to and click it to take you to the View editor.
  3. Select Components in the toolbar.
  4. Click Add a component. If the Power Apps Grid Control does not show in the list, click Get More Components and add it
    Get More Components
  5. In the Control’s settings, change the below option from No to Yes
    Add Power Apps Control
  6. Ensure that before clicking Done, that the Show Component On has the display types selected that you need:
    Show Component On
  7. Save and publish the view

Enabling aggregation on a subgrid

  1. In the Power Platform Maker Portal, find the table you wish to customise and select Forms.
  2. Find the form you wish to customise the subgrid for and click it to launch the Form Editor.
  3. If you already have the subgrid on the form, click it to highlight it or add a new subgrid to the form and then select it
  4. At the bottom of the settings pane, there is an option to add a Component. Click the + Component option.
    Add a subgrid to a form
  5. If the Power Apps Grid Control is not listed, add it via the Get More Components option:
    Add a Component
  6. Once added, select it to view the settings for the Component. Look for the aggregation setting and change it from No to Yes:
    Add Power Apps Control
  7. Ensure that before clicking Done, that the Show Component On has the display types selected that you need:
    Show Component On
  8. Save and publish the form.

What are the limitations of the aggregation function?

This aggregation might not be suitable for large datasets, as the values returned are only for the initially-displayed results. This means that if you have more records than are returned in the initial query (i.e. if you have multiple pages of data or have to use the infinite scroll to see more records), then these records won’t be used in the aggregation. This may change once the feature comes out of preview, but for now, we would recommend using this feature on form subgrids rather than views.

Summary

It is good to see Microsoft adding further functionality to the Power Apps Grid Control and with its modern design and additional features, it is recommended that organisations currently using traditional Dynamics views switch to the Power Apps Grid Control. For existing clients of Strategy 365 who want to explore this new feature, get in touch with one of our support experts.

Sign up to receive regular product & business updates direct to your inbox.
 
 
 
First Name*
 
 
Last Name*
 
 
 
Email Address*
 
 
 
 
 
 
 
 
 
Please see our Privacy Policy and Data Protection Policy for information on how we use your data