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 / Calculate Remaining We...
Power Automate
Unanswered

Calculate Remaining Weeks for the Year Using Flow

(1) ShareShare
ReportReport
Posted on by 2

Hi,

 

I am building a solution for allocating some assets to the users. The solution is consisting of three lists as below.

 

1. User List (where all the users will be added).

2. Transaction Details (Where all the asset allocation details added).

3. Calendar List (where i will have a list of all the weeks of the entire year).

 

The process will be as below.

 

When we add a user in the first list (User List), i want that his the records of remining weeks should be automatically created in the Transaction Details List. For example, suppose this is 20th week then there should 32 or 33 records to be created in the Transaction Details List. I am not able to figure out the below points.

 

1. How can i calculate how many weeks we have in this year.

2. Creating records for the specific user of the remaining weeks of the year.

 

Can anyone please help on how to achieve this?

 

Many thanks in advance.

 

Regards,

Akshay

Categories:
  • SimnaJ Profile Picture
    205 on at

    You can achieve this using Power Automate. Here's how:

    1. Create a new flow in Power Automate and set the trigger as "When an item is created or modified" in the User List.

    2. Use the "Get week numbers for a year" action from the "Date Time" connector to get the list of week numbers for the current year.

    3. Use a "Get items" action to check if any records exist for the user in the Transaction Details List.

    4. If there are no records for the user, use a "Create item" action to create a new record for each remaining week of the year in the Transaction Details List.

    5. Set the values of the newly created Transaction Details records to the corresponding user and week number.

    6. You can also use a "Delay" action to add a delay between each item creation to avoid exceeding any limits.

    By following these steps, you can automatically create records for the remaining weeks of the year for each user in the Transaction Details List as soon as they are added to the User List.

    If you found this post helpful, please give it a thumbs up and consider marking it as a solution so others can benefit from it as well. Thank you!

  • AkshayManke Profile Picture
    2 on at

    Thanks @SimnaJ, i will try this and will get back by Monday.

     

    Regards,

  • SimnaJ Profile Picture
    205 on at

    Let me know if it works.

  • AkshayManke Profile Picture
    2 on at

    Hello @SimnaJ,

     

    I tried but I can't find the "Get week numbers for a year" action in the "Date Time". Below the snap for your reference. Am I missing something?

     

    Image 1.JPG

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
Mohsin Ali Profile Picture

Mohsin Ali 330

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 123

Last 30 days Overall leaderboard