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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
renecernitz
Frequent Visitor

How to get the date of the next specific day of the week from a given date

Hi fellow members,

 

I need to solve th following issue:

 

From a given date I need to obtain the date of thursday of the following week.

 

Input dateInput day of weekResultResult day of week
06/09/2021monday16/09/2021thursday (next week)
08/10/2021friday14/10/2021thursday (next week)
13/10/2021wednesday21/10/2021thursday (next week)
18/10/2021monday28/10/2021thursday (next week)

 

Thanks in advance

 

@BA_Pete

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @renecernitz ,

 

Try this in a new custom column:

Date.AddDays(Date.EndOfWeek([Input date]), 4)

 

This gives me the following ouput:

BA_Pete_0-1636370332424.png

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @renecernitz ,

 

Try this in a new custom column:

Date.AddDays(Date.EndOfWeek([Input date]), 4)

 

This gives me the following ouput:

BA_Pete_0-1636370332424.png

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Suggest you specify the `firstDayOfTheWeek` argument as `Day.Monday`. 

 

If I don't do that, your formula returns the next Wednesday.  Possibly due to my regional settings which have Sunday as the first day of the week. 

 

Or, better yet, ask the OP when his week starts, and adjust accordingly.

Hi @ronrsnfld ,

 

Thanks for the suggestion.

If the necessary correction was more difficult than changing one number then I might have done so.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.