Can Two Power App Developers Beat The Clock In The DevDash Challenge? (Ep. 2)
In this video, Matthew Peterson from Pragmatic Works demonstrates how to use rollup columns in Dataverse for Power Apps. Rollup columns are an essential feature that allows users to aggregate data from related records, such as summing donations, calculating averages, and determining minimum or maximum values across child records. This functionality helps streamline data management and reporting in Power Apps, reducing the need for manual calculations.
Overview of Rollup Columns
Rollup columns are used when you need to summarize values from related records in a parent-child table structure. Matthew illustrates this concept using a school club donation app where multiple donations are linked to various clubs. By using rollup columns, users can see the total amount of donations for each club without manual calculations.
Setting Up Rollup Columns
The process for setting up rollup columns involves the following steps:
- Create a relationship between the parent table (e.g., Clubs) and the child table (e.g., Donations).
- Go to the parent table and create a new column where the rollup will occur, ensuring the data type matches the data from the child table (e.g., decimal for donation amounts).
- Configure the column to be a rollup column, and specify which child table the data should come from.
- Select the aggregation type: sum, minimum, maximum, average, or count.
- Save and publish the rollup column, and add it to your views or forms for display.
Demonstration
In the demonstration, Matthew walks through setting up a rollup column for a school club donation app. Here's how he implements it:
- He creates a new column in the Clubs table called "Sum of Club Donations," ensuring the data type matches the donation amount.
- He specifies that the source of the data is the Donations table, which has a lookup to the Clubs table.
- He chooses the "Sum" option to aggregate the total donation amounts for each club.
- After saving and publishing, the app automatically updates every 12 hours. However, users can manually refresh the data by clicking on a calculator icon within the form.
Customization Options
Matthew also highlights some customization features of rollup columns:
- Rollup columns can be displayed in both views and forms, offering users the flexibility to see the aggregated data in different contexts.
- Rollup columns are read-only, so they cannot be manually edited but are updated automatically based on scheduled or manual recalculations.
- Filters can be applied to rollup columns to only aggregate certain records (e.g., donations within a specific date range), but this was not covered in detail in the video.
Manual Recalculation
Once the rollup column is set, recalculations typically occur every 12 hours, but users can manually force a recalculation if needed. For example, after adding a new donation, the app recalculates the total for the Cooking Club, displaying the sum of all donations made to that club.
Practical Use Cases
Matthew explains how rollup columns are highly effective in situations where large datasets are involved. For instance, he implemented a similar system for his school to manage parent donations. The same principles can be applied to other scenarios, such as calculating totals or averages in any parent-child data relationship within Power Apps.
Conclusion
Rollup columns in Dataverse for Power Apps provide a powerful way to automate the aggregation of data, reducing manual calculations and improving data accuracy. Whether you're summing donations, averaging grades, or counting records, rollup columns streamline data management in model-driven apps.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
Matt Peterson is a Trainer for Pragmatic Works specializing in the Power Platform. He graduated from the University of North Florida in 2006 and comes with 15 years of teaching experience in high school algebra. Matt earned the accomplishment in 2013 of being named the Florida Gifted Teacher of The Year. His primary focus is helping our customers learn the ins and outs of Power Apps and Power BI.
Free Trial
On-demand learning
Most Recent
private training
Leave a comment