How to instantly sum an Array of numbers in a Power Automate Cloud Flow

How to instantly sum an Array of numbers in a Power Automate Cloud Flow

Paul Murana

3 года назад

13,630 Просмотров

This is the ultimate performance method of summing an array in Power Automate. I used this method to sum an array of 100,000 records in less than 1 second using the powerful xpath function. Normally you would use an apply to each loop, but with this method there is no need.

You can save flow actions and get maximum performance with the xpath method, which is simple to do. Full details on the blog post: https://www.tachytelic.net/2021/06/power-automate-instant-sum-array/

Тэги:

#PowerAutomate #Office_365 #PowerPlatform
Ссылки и html тэги не поддерживаются


Комментарии:

@AlzD3mi4n
@AlzD3mi4n - 20.12.2023 16:32

Thank you, Paul! Your video is amazing!
I wonder if there is a way to filter the information to send it to specific users, in your example, sum only the invoices from ID 1 and send it to user 1?

Thank you in advance for your help!

Ответить
@madhavadhatrao3528
@madhavadhatrao3528 - 17.12.2023 15:19

You are the best Paul. Such great content ,Thank you so much

Ответить
@isabellapineda1679
@isabellapineda1679 - 15.11.2023 23:40

Muchas Gracias , dure mucho buscando información sobre como sumar una Columna , que no fuera con incremento que pasara por cada registro de obtener elemento, muy valioso el aporte muchas gracias

Ответить
@ronakshah6336
@ronakshah6336 - 19.10.2023 02:10

How to convert the SUM into HTML Table and share it to the email

Ответить
@abcd64709
@abcd64709 - 29.09.2023 07:32

Thank you Paul. How do you set 100,000 record threshold by the way?

Ответить
@jasonhawkins3977
@jasonhawkins3977 - 20.09.2023 14:23

You bloody Legend! I'll never sum the standard way again! For big datasets this is the only way to sum without it taking literal hours. Thanks Paulie!

Ответить
@nguyenmanhtuan1772
@nguyenmanhtuan1772 - 16.09.2023 13:49

Its works for me, thank you a lot Sir

Ответить
@DaniBored
@DaniBored - 23.06.2023 18:42

Thank you sir, you saved me. I had been trying to do this for a day ! 😄

Ответить
@jenefermonroe5999
@jenefermonroe5999 - 07.05.2023 19:08

Wow! This was amazing. I'm glad I didn't give up before I found your video!

Ответить
@user-uy9ew5my4i
@user-uy9ew5my4i - 01.05.2023 16:12

Thank you. Great tip!

Ответить
@parranoic
@parranoic - 26.02.2023 21:53

Superb! Thank you

Ответить
@ImuRazz
@ImuRazz - 16.02.2023 23:26

I have like 8 columns and how can i sum each and append it to the table?

Ответить
@ThomasPublicThuene
@ThomasPublicThuene - 04.02.2023 23:18

Wow, that was quick.

Ответить
@zYxMa
@zYxMa - 23.01.2023 17:29

Amazing solution. Why didn't Microsoft include a SUM function is beyond me, yet this is extremely simple and will potentially save hours (and in some cases DAYS!!!) in generating reports for me :)

Ответить
@vsone9565
@vsone9565 - 05.01.2023 19:42

Thank you for your creative solutions - truly helpful.

Is it possible to use this method in a way that sums certain groups of values in an array?

ex.

[
{
"Id": "A",
"quantity": "3"
},
{
"Id": "A",
"quantity": "3"
},
{
"Id": "B",
"quantity": "2"
}
]

Where we want A - 6, B - 2

Ответить
@berndkretzschmar5139
@berndkretzschmar5139 - 16.11.2022 09:33

Chapeau, it really helped.

Ответить
@kingsleyudeagha
@kingsleyudeagha - 12.09.2022 15:41

You are the best Paul. Such great content for free. Amazing.

Ответить
@clausfraenkel2968
@clausfraenkel2968 - 19.08.2022 21:54

You use this approach to sum 100.000 rows but how do you set this up with “get items” - i have problems with limit on that

Ответить
@Hansman
@Hansman - 08.08.2022 17:05

Hi Paulie How do you sum rows using this method?

Ответить
@Hansman
@Hansman - 05.08.2022 23:23

How do you do this on multiple columns on a list ? then get each sum and send it to another summary list?

Ответить
@jonmatthews5642
@jonmatthews5642 - 07.04.2022 16:05

This worked a treat for me and is soooooo much quicker than an apply to each!

but how can I get the min/max values?

Thanks

J

Ответить
@damiandamian3961
@damiandamian3961 - 13.01.2022 16:32

How do you do it with a dataverse table

Ответить
@josephansah
@josephansah - 14.12.2021 18:28

Thank you very much Paulie. Recently discovered your videos and I must say that I really enjoy good content. I have watched a few and learnt something different and not so obvious in all of them; straddles the line between intermediate to pushing on advanced learning. Maybe not in this simpler example, but at least in the other videos I have seen 🙂 More grease to your elbows.

Ответить
@RahulSharma-em6en
@RahulSharma-em6en - 26.08.2021 06:52

Thank you very much for such clear and informative video.

Ответить
@RyanEverhart1350
@RyanEverhart1350 - 26.07.2021 23:35

Worked great! Thank you so much!

Ответить
@Mx81
@Mx81 - 07.06.2021 11:25

Great tip.
I run into an error if there are null/blank values included.
I found and tried this one, but I get an "invalid expression" error back:
xpath(outputs('Compose_JSON2XML'),'sum(/root/Numbers[string(number(.)) != 'NaN'])')
Do you know how to handle this?


I also couldn't find a documentation about the xpath function like 'sum'. Would be great to have an overview of the possibilities ;-)

Ответить
@juansepowerplatform
@juansepowerplatform - 02.06.2021 14:57

Great to know this. Thank you

Ответить
@arshad801
@arshad801 - 02.06.2021 02:16

Always good to learn something new

Ответить