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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Group table records an...
Power Apps
Unanswered

Group table records and calculate Sum of Column values

(0) ShareShare
ReportReport
Posted on by

Hi Team,

 

I'm building one Model Driven App, and want to calculate the SUM of Hours column values for same resource. 

 

Something like below.

Capture1.PNG

Capture.PNG

 

Can anyone please help.

 

Regards,

Mayank

I have the same question (0)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Anonymous ,

     

    there is a concept of Rollup fields that will allow you to total child entity records into a parent record so I would utilize this if I had a User as the parent of the timesheet records and I wanted to total the actual hours on the child timesheet record.

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-rollup-fields?view=op-9-1 

     

    Now, overall this has always been a pretty "limiting" capability for me as I usually want to see the total hours by week, month, by subject, by user, etc.

     

    You can do some of this if you created Charts related to the table where you can visually see the total actual and academic hours by subject (https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/basics/start-your-day-dashboard-chart?view=op-9-1) - I now this is discussing Dynamics 365 but same approach for Dataverse...

     

    Another option is Excel Templates that you can create and load in the system and access from the Timesheet view.  You can create summed tabs, pivot tables, charts, etc. based on the Timesheet data and every time you access this template it is the current data.  https://docs.microsoft.com/en-us/power-platform/admin/analyze-your-data-with-excel-templates 

     

    The best method to really accomplish what you are looking to do is to utilize Power BI and connect to the source being Dataverse and you can really do whatever you want from there.  Much more capability to sum / count / slide and dice as you need.

     

    I know this is not a direct answer to your original question but a table in the Dataverse with these summed values is not really possible.

     

    Hope this helps.  Please Accept if answers your question or Like if helps in any way.

     

    Thanks,


    Drew

  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @Anonymous,

     

    Create a Lookup with Source TABLE with Resource

     

    then in the Resource Table Create a ROLLUP Field then you can SUM(Related Source Table)

     

    if you want condition you can add too

     

    Please mark as Answer if it is helpful and provide Kudos

     

     

    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • Community Power Platform Member Profile Picture
    on at

    Hi @rampprakash 

     

    Thanks for your response, i tried your suggestion but i might missing something or their is some column mismatch. Not getting any data in RollUp field.

     

    gumgih_0-1632498318132.png

    Sharing below the required table view.

     

    gumgih_1-1632498864518.png

     

    gumgih_2-1632499022972.png

     

    Many Thanks in advance.

     

    Regards,

    Mayank

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Anonymous ,

    That is the exact issue I was mentioning with Rollups. It is not going to let you do this...  

     

    Thanks,


    Drew

  • Verified answer
    Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @Anonymous,

     

    For instant calculation you need to Click Recalculate Button for the Record to get it populated instantly. Because its job will run every night to update to calculate the Rollup Fields.

     

     

    But I tired from my end unfortunately its working fine from my end.

     

    User Details Screen Shot:

     

    rampprakash_0-1632507789994.png

     

    Time Sheet Screen Shot:

     

    rampprakash_1-1632507806954.png

    Please find the attached unmanaged solution for your reference you can import the same and try again.

     

    My Video for Your reference for Rollup and Calculated Fields : (3) Working with Calculate and Rollup Fields in Dataverse and MSCRM - Series 8 - YouTube

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • Prakash4691 Profile Picture
    1,332 on at

    @Anonymous 

     

    This can be achieved by using power automate. New entity needs to be created, replicate table schema same as parent entity.

     

    Please find below actions w.r.t power automate.

    1. Trigger when new rows gets added to parent entity dataverse table.

    2. list rows for parent entity, filter rows with name so we get list of records for that name.

    3. list rows for new entity, filter rows with name and set row count to 1

    4. compose action to get first record from step 3

    5. initialize variable for hours

    6. apply to each for step 2 list rows, inside apply to each add two steps for adding the hour values

        6.1. compose action add hours variable and current item total hours
        6.2. set hours variable to compose action output

    7. add condition to get length of list rows for new entity, if it is greater than 1 update the record or else create.

     

    Added few screenshots of power automate actions and also end result of records in table for your reference. Test 3s is parent entity and test 4s is replica of test 3s entity.

    Prakash4691_0-1632826591828.pngPrakash4691_1-1632826631942.pngPrakash4691_2-1632826679809.png

    Prakash4691_3-1632826718721.png

    Prakash4691_4-1632826881629.pngPrakash4691_5-1632826902757.png

     

    If it answers your question, kindly give kudo and accept it as solution.

     

     

    Regards,

    Prakash

  • Community Power Platform Member Profile Picture
    on at

    Hi @rampprakash ,

     

    Thanks for your help.

     

    It works and i'm able to achieve my requirement, in quite different way but manageable.

     

    Thanks again 🙂 

     

    Regards,

    Mayank 

     

     

  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @Anonymous,

     

    That was Awesome.

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • Az8PnG Profile Picture
    85 on at

    Hey @rampprakash do u have the full code for this? It is very helpful. Thanks Prakash for this!

  • AsheshR Profile Picture
    90 on at

    Hello Prakash,

    I need your help for a similar power automate flow that will:

     

    will automatically every day, interact with 2 dataverse tables: Comptes Entreprises Table and Affaire table. Calculate the field named "Total facturé année en cours" which is the sum of the field “Montant TTC” in the Affaire table. 1 Account record may have many related affaires with different “Montant TTC”

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard