Hello,
I have a list that looks like this:
In a workflow, I would like to count the number of times the choice "Nantes" appears in the "Mardi" column. But I can't do that at all. Can you help me please ? 😞 Thank you in advance !
Hello,
I have a list that looks like this:
In a workflow, I would like to count the number of times the choice "Nantes" appears in the "Mardi" column. But I can't do that at all. Can you help me please ? 😞 Thank you in advance !
Hi @RobElliott ,
your answer for this question is great and very helpful.
I am working on a similar case, but the numbers have to be counted for each owner (person). Could you please
guide me how to do it.
Example of the output:
Thank you in advance.
Miso101
Your answer is awesome! Thank you so much !
@StretchFredrik your method means you have to change the flow and run it separately for each of the flow options. My method above avoids that and only needs to run once.
Rob
Los Gallardos
@s44 I'm sure there are several ways to do this, but the way I would do it is shown below.
In our list we have 5 choices for Nantes and 3 each for Rheims and Paris:
After the trigger, initialize a float variable for each choice:
Next, add a get items action. So that you are not bringing back any empty items adda filter query of Mardi ne null
Add an apply to each and select value from the dynamic content. Next we add a Switch which is a type of Condition that just looks at the answer to one thing. As it's a choice column select Mardi Value (not Mardi) from the dynamic content box.
In a Switch you can have up to 27 "cases", for example Mardi Value equals Rheims. Inside each case box add an increment variable action, select the appropriate variable and set the amount to increment it by to 1:
Finally outside of the apply to each add a Compose action for each of the choices/variables and set the input to the variable.
The result is shown below. The flow has looped through all the items in the list where there was a choice selected, incremented the appropriate variable by 1 and then displayed the overall result in the Compose action.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Hello,
I would run a "Get objects" step to get the SharePoint list data with a filter query to only get the rows im looking for, for example: Mardi eq 'Nantes'
Id then do a expression to get the amount of rows on the output from the step above: @length(body('Get_rows')?['value'])"
Hopefully this is a step in the right direction for you 😊
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492