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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow that counts how m...
Power Automate
Answered

Flow that counts how many times condition is true

(1) ShareShare
ReportReport
Posted on by 7

I have this SharePoint list with 7 dates and I need to get the quantity of dates in June 2022.

For this I made a Flow with a For loop that verifies if the date contains the variables mesData = 6 and anoData = 2022. If it returns true it should only increment my variable Account the number of occurrences of 06/22. However it increments the entire quantity of items in the list (7)

PS: The variable inicioFerias in the condition receives all the dates in the column Holiday Start.

Appreciate any help!

 

Thank you.


sharepointlist.pngforeach.png7times.png

Categories:
  • Verified answer
    NiloferA Profile Picture
    on at

    To solve your problem, you can simply add a Calculated Field with the below formula which will return the "Month" from the Date Column

    =TEXT([Date],"mm")

     

    This is how it works

    NiloferA_0-1618987177736.png

    Then in your Flow you can

    1. Query the List to Get all The Items
    2. Initialize an Integer Variable to increment if June is encountered in the Month column
    3. Add an Apply to Each action for all the items
    4. Check for the Condition where "Month" field is equal to 06
    5. If Yes, then Increment the Variable

    NiloferA_1-1618987245149.png

    Hope this helps!

  • MateusGomes Profile Picture
    7 on at

    Thank you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard