web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Rollup decimal field -...
Power Apps
Unanswered

Rollup decimal field - How to filter related records based on a lookup column

(0) ShareShare
ReportReport
Posted on by 4
Here is a very simple diagram:



Suppose that Table 1 is a "Order Table", Table 2 "Order Details Table" and Table 3 "Product Details Table".

I need to create a column in Table 1 of the y Sum of the total cost of specific product type of the related rows in Table 2.

I tried using rollup behavior and calculated behavior columns but can't filter the related records based on the product type.

Powerautomate is not an option given the async nature of the flows. I need something instantaneous (like the calculated and rollup fields).

Also, I don't want to put the product type of each product on Table 2, to hold the normalized form of the table.

Any idea how to make it?
I have the same question (0)
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Rollup decimal field - How to filter related records based on a lookup column
    Just some thoughts: 

    First, rollup fields are not really instaneously updated.  They generally update 12 hours after you create the field then every hour--unless this has changed recently or you manually update the cadence.

    Second, you can filter rollup field calculations based on column values, even choice fields on the related table.  I don't know enough about your data model/business logic to know for sure--but I would guess at first glance that you should be able to get rollups to work for you.

    Another option you could consider for greater flexibilty is to use an "Automated plug-in" in the Dataverse Accelerator App.  It's a newer feature but allows you to run Power FX code just like in a Canvas App in the background when a record is modified or created, and you can add in conditions of course to limit runs.

    If you need to calculate your sum of specific product type column for the order as part of your sales or order process, I'd consider an automated plug in, power automate or even a small canvas app.  You can drive updates of the column by changing the status of your order, confirming it's ready, that sort of thing.

    If you just need this number for reporting or a dashboard, maybe Power BI is another way to handle it.
  • Suggested answer
    CU29051324-0 Profile Picture
    4 on at
    Rollup decimal field - How to filter related records based on a lookup column
    As Mark suggested, the rollup itself is not instantly updating, but if this is not necessary, I would suggest this approach which uses standard functionality:
    - add a new colum to your Table 2 "cost of specific product type" 
    - calculate this column with a synchronous workflow: 0 when the product has not the specific product type, otherwise copy the cost from the standard cost column
    - use for the rollup field the new column "cost of specific product type"
    This is a simple solution that should solve your problem.
     
    The other more complex options are:
    - implement a synchronous plugins to calculate the rollup field. There are several plugins neccessary which must run on create, change of cost or product type and also on delete of a Table 2 row. When the record of table 2 can be relinked to another row of table 1 both rows of table 1 must be refreshed. The problem of a plugin is the 2 minute limit, when there are many records in table 2 linked to one record in table 1, this limit can be reached.
    - implement cloud flows doing the calculation. You have to recognize the same cases as with the plugin. The issue here is, that cloud flows are running asynchronously and the users have to wait and reload to see the calculated value. Here is no 2 minute limit.
     
    When the calculated number is only necessary for reporting, Power BI should be a good way to handle it.
  • Ram Prakash Profile Picture
    5,576 Super User 2025 Season 2 on at
    Rollup decimal field - How to filter related records based on a lookup column
    Hi,
     
    Usually plugin update in 12 hrs, if you want immediate use plugins to update rollup (CalculateRollupFieldRequest)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard