Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Measure to show start and end dates of current ISO week

Hello,

I have this measure in a Card visualization which shows the start and end dates of the previous ISO week (starting on Monday and ending on Sunday) but i am having trouble to adapt it to show the dates for the current week. Any help is much appreciated!

MakeItReal_0-1659264822045.png

 

Previous ISO Week Dates = FORMAT(today()-SWITCH(WEEKDAY(today(),2),1,1,2,2,3,3,4,4,5,5,6,6,7,7)-6, "d/m/yyyy") & " - " & FORMAT(today()-SWITCH(WEEKDAY(today(),2),1,1,2,2,3,3,4,4,5,5,6,6,7,7), "d/m/yyyy")

 

Expected results:

25/7/2022 - 31/7/2022

1 ACCEPTED SOLUTION
Payeras_BI
Super User
Super User

Hi @Anonymous ,

Payeras_BI_0-1659265676341.png

Current ISO Week Dates = 
FORMAT ( TODAY () - WEEKDAY ( TODAY () ,2 ) +1 , "d/m/yyyy" ) & " - " & FORMAT ( TODAY () - WEEKDAY ( TODAY () ,2 ) +7 , "d/m/yyyy" )

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@Payeras_BI @Jihwan_Kim Thank you for your reply! The two proposed solutions work. But i can only accept one post as the solution, so i will just go with the first reply. Thanks again to you both!

Payeras_BI
Super User
Super User

Hi @Anonymous ,

Payeras_BI_0-1659265676341.png

Current ISO Week Dates = 
FORMAT ( TODAY () - WEEKDAY ( TODAY () ,2 ) +1 , "d/m/yyyy" ) & " - " & FORMAT ( TODAY () - WEEKDAY ( TODAY () ,2 ) +7 , "d/m/yyyy" )

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain
Jihwan_Kim
Super User
Super User

Hi,

Please try the below if it works.

 

Previous ISO Week Dates = 
FORMAT (
    TODAY ()
        - SWITCH ( WEEKDAY ( TODAY (), 1 ), 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6 ) - 6,
    "d/m/yyyy"
) & " - "
    & FORMAT (
        TODAY ()
            - SWITCH ( WEEKDAY ( TODAY (), 1 ), 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6 ),
        "d/m/yyyy"
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.