How to group and calculate sum of Power Automate array items

Sdílet
Vložit
  • čas přidán 7. 08. 2024
  • Considering Power Automate is missing aggregate functions, when we need to summarize data, we have to loop through the items of an array and calculate sum of the desired records one by one. In this video we have a sample array of records that we group the items by a specific field and then calculate the sum (subtotal) of the numeric field for each group.
    Get the power automate expressions course here:
    www.udemy.com/course/master-m...
    To enroll in my Udemy courses see below link for discount vouchers
    sslwsh008.securedata.net/dotn...
    - 0:00 Instroduction
    - 1:57 Setup
    - 3:30 Power Automate expressions training
    - 4:33 Solution strategy and steps
    - 5:22 Building the solution that groups and calculates subtotal
    - 23:26 Testing the solution and reviewing the results
    - 24:03 Conclusion
    Contact me
    - LinkedIn / alirezaaliabadi
    - Twitter / aaliabadi1
    - Instagram / alireza.aliabadi_ig
    - Facebook / alireza.aliabadi.fb
  • Věda a technologie

Komentáře • 37

  • @MohammadAli-ts2ev
    @MohammadAli-ts2ev Před 2 lety +3

    Great explanation. The Compose inside a loop in order to get the current attribute is great

  • @junbecks
    @junbecks Před 10 měsíci

    I cannot thank you enough. Complicated but very well explained in stages. I liked that you wrote a visual at the start to see all the tables that we will need.

  • @user-zm5ln1xd5l
    @user-zm5ln1xd5l Před rokem

    I've got some really *woof* tedious counting to do and your video (by half way through) got me done with a good chunk of it. I really appreciate the tutorial!

  • @ryanmullaney1838
    @ryanmullaney1838 Před 2 lety

    Thanks for this Alireza - it shows some great concepts and takeaways, even if it's not a 'preferred' method of summing values in arrays. Great job, as always!

  • @mohamedjemaii5292
    @mohamedjemaii5292 Před rokem

    Great, I was looking for this and it brings almost exactly what I needed, Thank you

  • @qzll333
    @qzll333 Před 11 měsíci +1

    very well explained. Thanks for that crack!

  • @btoz6237
    @btoz6237 Před rokem

    Thank you for this great video Alireza!

  • @maryamhashemi5825
    @maryamhashemi5825 Před 2 lety

    Great content as always

  • @stevenvits152
    @stevenvits152 Před 2 lety

    excellent tip. compose will do the trick :)

  • @andresnicolasrodriguezsanc4586

    it works, thank you!!

  • @emilyeasterday4457
    @emilyeasterday4457 Před 9 měsíci

    Thank you for this video! I think this solution may become too bulky very quickly for my purposes; what connectors would you recommend for performing this action? I am so frustrated!

  • @adnanaljasem7139
    @adnanaljasem7139 Před 2 lety

    Great as always, Thanks Alireza! I'm wondering if it's possible to use a similar approach to create an XML file with a defined schema using apply to each based on a CSV file?

  • @drbadiodefora
    @drbadiodefora Před rokem

    Y're the best!!

  • @franknielsen3219
    @franknielsen3219 Před 2 lety

    Very very good explanation 👌👌👌👌👌👌

  • @danielmacias5880
    @danielmacias5880 Před 9 měsíci

    Hi, thanks for the content, I went to your JSON course, Helpful.
    To add a comment, I can tell that if we perform this in a large dataset, it will take more than 40 minutes flow to finish.

  • @marconoshy2243
    @marconoshy2243 Před rokem

    Thanks very good 👍

  • @devray6036
    @devray6036 Před měsícem

    I enjoyed it

  • @ajfuad
    @ajfuad Před rokem

    Great video Ali. Thinking if this can be used in our transport booking app we are trying to build. BTW, can the powerautomate expressions and checks be used as commands in powerautomate, like use ForAll to loop and if conditions? Just curious if that would speedup the calculation?

  • @sundrapillay6668
    @sundrapillay6668 Před 2 lety

    Thanks Alireza

  • @maksimdmitrenko
    @maksimdmitrenko Před rokem

    Alireza, Thank you!

  • @afzalrosman8260
    @afzalrosman8260 Před 10 měsíci

    Thanks for this, Alireza, but can you create the same procedure like this but compare values from two sources, which are Excel and sharepoint and generate a new Excel report

  • @SeanAstro
    @SeanAstro Před rokem

    I like that compose trick! Not sure if you mentioned it but is there a reason you're not using Union to get the unique emails or the Xpath with Sum to calculate your sum? Seems like two ApplyToEachs will slow down performance.

  • @vijayalakshmichitturi-lu4gm

    How to perform sum of colums
    related records of parent record using power automate flow ms crm d365

  • @ITHelpdesk-ib9um
    @ITHelpdesk-ib9um Před měsícem

    how about i want to group it by "user" and "department" for example,
    {
    "user": "user-A",
    "department": "dept-1",
    "duration": xxx
    }

  • @Learnpowerplatform
    @Learnpowerplatform Před 2 lety

    Great content.
    Tried to register other udemy course with promo code but it is expired

  • @YangLi-bf3tf
    @YangLi-bf3tf Před 2 měsíci

    I have a question regarding the unique user part, why don't we use union expression to get all the unique user list? will that be easier?

    • @AlirezaAliabadi
      @AlirezaAliabadi  Před 2 měsíci

      Yes it is. I was not thinking about union when I was recording it.

  • @danielpereira4942
    @danielpereira4942 Před rokem +2

    Hello Alireza, why you don't use the expression "Union" in the same array, to get the distinct users list?
    I believe this is more efficiently that apply to each :)

    • @AlirezaAliabadi
      @AlirezaAliabadi  Před rokem

      You are right. I didn't even think about union when making this video.
      Thank you!

    • @danielpereira4942
      @danielpereira4942 Před rokem +1

      In the sum of numbers u can use xpath to read one xml json with the values in he, it's more efficient too, this method sum 100 m values about in 1 second

    • @danielpereira4942
      @danielpereira4942 Před rokem

      Not for that reason, spreading the knowledge that we get along the developments is something always welcome all over the world! :)
      Power Automate is amazing!

  • @mallelajyothi9819
    @mallelajyothi9819 Před 9 měsíci +1

    I have a large amount data how to intialize

    • @AlirezaAliabadi
      @AlirezaAliabadi  Před 9 měsíci +1

      Don't. Look for a third party action who does that.

  • @yann6757
    @yann6757 Před rokem

    damn PowerAutomate is definetly not a real ETL, can be done in one step in Talend or Pentaho.....

    • @AlirezaAliabadi
      @AlirezaAliabadi  Před rokem

      I agree with you 100 percent. Still I am wondering why aggregate functions are not available in power automate