Skip to main content

Notifications

Community site session details

Community site session details

Session Id : X9B+3RYMm3vXtHCiMSvXQV
Power Automate - Building Flows
Answered

Help - How to get last week's number from date in Power Automate?

Like (1) ShareShare
ReportReport
Posted on 10 Feb 2025 11:38:19 by 11
Help - How to get last week's number from date in Power Automate?
  • Suggested answer
    CU10021113-0 Profile Picture
    11 on 10 Feb 2025 at 19:28:22
    Help - How to get last week's number from date in Power Automate?
    Thank you very much, solve my problem!
  • Verified answer
    Expiscornovus Profile Picture
    31,643 Most Valuable Professional on 10 Feb 2025 at 12:08:28
    Help - How to get last week's number from date in Power Automate?
     
    You can calculate it with an expression. Ryan Maclean has for example shared a blog about this.
     
    In your case you want to change that expression to sub 1 week from the UtcNow (Today's date).
     
    Below is an example based on ISO 8601 week numbers 
    That should return 6 today
     
    sub(div(add(dayofyear(addDays(subtractFromTime(utcNow(), if(equals(dayofweek(utcNow()),0),6,sub(dayofweek(utcNow()),1)), 'Day'),3)),6),7), 1)
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard
Loading started