cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

Is there a way to calculate totals in model-driven apps?

Hello I am trying to get the sub total of a bunch of entities that have a many-to-one relationship with another entity. I was able to get this to work in a canvas app through the use of filtering and Sum() but don't know if it is even possible with model-driven apps. I first thought of using a Flow but then see that there's no way to send data back to a model-driven app the same way I can with a canvas. 

 

model-driven-app.png

 

Is this possible with model-driven apps or should I just stick to canvas?

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Mgodby ,

 

If you want to sum the total field from child entity, you can create a Roll-up field to calculate the aggregation.

The rollups are calculated by scheduled system jobs that run asynchronously in the background. The asynchronous job executes once per hour, attempting to recalculate the rollup attribute. In additional to the hourly system job, users may manually force a system recalculation.

Note: You should have write access on parent entity 

Snipaste_2019-11-25_18-02-26.png

Snipaste_2019-11-25_18-10-37.png

Best regards,

Sik

View solution in original post

2 REPLIES 2
Yocomd
Helper I
Helper I

Roll-up fields allow you to sum fields on a one-to-many entity, but those only recalculate every 12 hours, so if you want to see it updated immediately, they're not ideal. (They do have a refresh button attached to the field, which the user can click to force it to recalculate, but you probably don't want to expect the user to do that).

If you can write JavaScript, you could create a Web Resource with a method that pulls in the data, sums it, and fills in the field with the summed value.
v-siky-msft
Community Support
Community Support

Hi @Mgodby ,

 

If you want to sum the total field from child entity, you can create a Roll-up field to calculate the aggregation.

The rollups are calculated by scheduled system jobs that run asynchronously in the background. The asynchronous job executes once per hour, attempting to recalculate the rollup attribute. In additional to the hourly system job, users may manually force a system recalculation.

Note: You should have write access on parent entity 

Snipaste_2019-11-25_18-02-26.png

Snipaste_2019-11-25_18-10-37.png

Best regards,

Sik

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,406)