How to count distinct Items in an Array in

  Рет қаралды 18,487

Paul Murana

Paul Murana

2 жыл бұрын

In this video I demonstrate how you can count the number of distinct items in a Power Automate array without having to use an Apply to Each loop for maximum performance. This is another demonstrations of the powerful xpath expression. Response to Power Automate Community Question:
powerusers.microsoft.com/t5/B...

Пікірлер: 23
@yeraldo05
@yeraldo05 2 жыл бұрын
Thanks a lot Paulie! I´ve been using the Xpath Expression because of you! It definitely speeds up the flows and the best part is that it also reduces the API calls.
@ricardobunge5957
@ricardobunge5957 Жыл бұрын
Another winner! Really need to spend more time with xml()... Thanks again!
@josemanuelimbachivarela4098
@josemanuelimbachivarela4098 Жыл бұрын
Man, you just saved my life, thank you very much for this great tutorial
@patriciobarrera7811
@patriciobarrera7811 Жыл бұрын
Truly helpful. Thank you!
@csjo77
@csjo77 6 ай бұрын
Yes! This did exactly what I needed! Thank you much, Paulie!
@PaulieM
@PaulieM 6 ай бұрын
You're so welcome! Well done!
@NonhleFMdlalose
@NonhleFMdlalose Ай бұрын
Used this in a logic app and it worked like magic 👍
@voodoomanclothingco.3102
@voodoomanclothingco.3102 7 ай бұрын
omg, thank you so much. I've been beating my head against the wall over and over for the past 3 days on this.
@PaulieM
@PaulieM 7 ай бұрын
You’re very welcome. Glad it was helpful to you.
@scottmckinney8535
@scottmckinney8535 3 ай бұрын
Legend. Thank you for this!
@PaulieM
@PaulieM 3 ай бұрын
No worries - glad it helped.
@TheAsterii
@TheAsterii 2 жыл бұрын
impressive!
@mgm23ind
@mgm23ind Жыл бұрын
Thanks a lot! I have been looking for this answer for 1 week and nothing worked except for this option. Please, if you have the same example using an Apply to Each loop, I would like to check it. Thanks again.
@ajambo2010
@ajambo2010 2 жыл бұрын
Hi Paulie, Brilliant thanks for this and good timing. I do need to do a mass delete of records in the Teams Table. Unfortunately our IT have locked access to the HTTP action. So I was going to leverage an earlier solution of your which uses Threads. I was going to run the Threads concurrently and the first thread would process rows 1 - 5000, the second thread 5001 - 1000 as so one. Within each thread there would be the 'apply to each' to 'delete row', which again would run concurrently maxing out a 50. My issue is that I do not know how to select rows 1 - 5000, 5001 - 1000 etc of a Teams Table. With a SharePoint list I can use the ID column. In the Teams Table I have created an AutoNumber column but this is saved as a text. I'm guessing a solution might involve 'Fetch XML Query' in the 'List Rows' action? Appreciate any suggestion?
@arshad801
@arshad801 2 жыл бұрын
Amazing
@PaulieM
@PaulieM 2 жыл бұрын
Thank you - appreciate it.
@DataisKing
@DataisKing 11 ай бұрын
I am trying to create a column that counts each individual item from the item column. What do I need to change in the flow? Item Count A 1 A 2 A 3 B 1 B 2 A 4
@rasmimatta6007
@rasmimatta6007 Жыл бұрын
How can I count from share point by text Ex. Column includes "Done" & " "Not Yet" how can I get in summarise table the count of each
@m.nisharahamed5356
@m.nisharahamed5356 9 ай бұрын
Did you get a solution?
@ayakosekino6453
@ayakosekino6453 4 ай бұрын
Please teach. I’d like to use this with number. I put the word bellow in the count column { length(xpath(outputs(‘XML’), concat(‘//Array[ID/number() = ‘ , item(), ‘]’))) }. But didn’t work. What should I do?
@ayakosekino6453
@ayakosekino6453 4 ай бұрын
I did it!! made a mistake in the first select function. Thanks a lot!!
@Sammyc53
@Sammyc53 Жыл бұрын
I'm getting an error. This is my simple array: STOCK ITEM 45 STOCK ITEM 45 STOCK ITEM 45 CUSTOM ITEM 582 CUSTOM ITEM 582 CUSTOM ITEM 582 CUSTOM ITEM 582 Working XPATH: //Array[text()="STOCK ITEM 45"] Expression, using the format in your example: length(xpath(outputs('XML'), concat('//Array[text()="',item(),'"]'))) Error: The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "Description": "@item()", "Count": "@length(xpath(outputs('XML'), concat('//Array[text()=\"',item(),'\"]')))" }' failed: 'The template language function 'xpath' parameters are invalid: the 'xpath' parameter must be a supported, well formed XPath expression. Please see aka.ms/logicexpressions#xpath for usage details.'.
@PaulieM
@PaulieM Жыл бұрын
I don’t think you need to escape the double quotes.
How to group and calculate sum of Power Automate array items
24:54
Alireza Aliabadi
Рет қаралды 15 М.
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 25 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 200 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 33 МЛН
Are you using the Microsoft Power Automate Filter Array Action wrong?
22:45
A Creative Opinion
Рет қаралды 15 М.
Power Automate | Apply to Each | Why? | Arrays and Objects
19:05
DamoBird365
Рет қаралды 35 М.
power automate joins | join array in power automate
11:05
Classy Powerapps
Рет қаралды 1,6 М.
Parsing Text from email with Microsoft Power Automate
17:53
Paul Murana
Рет қаралды 74 М.
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 8 МЛН
Дал денег, закрыл долги прохожим
0:24
Сергей Миракл Какая у тебя мечта?
Рет қаралды 2,3 МЛН
A to F | Guess the mixed color #colormixing #satisfying #art
0:17
Shark Zhan
Рет қаралды 17 МЛН
No es por nada pero ya estoy a otro nivel de fuerte 💪🏻😅
0:15