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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Reverting a date into the first of every single week

Hi, as you can see from the screenshot below, I have a "SCHEDULED_FROM" column, is it possible I could create a new column which only displays the first day (Monday) of that week? i.e. if the date is 27/10/2020, could i convert it to 26/10/2020.

 

 

screenshot 4.png

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

New Column = CALCULATE(MAX([SCHEDULED_FROM]),FILTER('Table',WEEKDAY([SCHEDULED_FROM],2)=1 && 'Table'[SCHEDULED_FROM]<=EARLIER([SCHEDULED_FROM])))

 

V-pazhen-msft_0-1611813196781.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

New Column = CALCULATE(MAX([SCHEDULED_FROM]),FILTER('Table',WEEKDAY([SCHEDULED_FROM],2)=1 && 'Table'[SCHEDULED_FROM]<=EARLIER([SCHEDULED_FROM])))

 

V-pazhen-msft_0-1611813196781.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

pranit828
Community Champion
Community Champion

HI @Anonymous 

I would use the below code

'Table'[SCHEDULED_FROM] - WEEKDAY('Table'[SCHEDULED_FROM],2)+1

 pranit828_0-1611671879945.png

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Check out THIS THREAD.

@TomMartens gives a perfect walkthrough for DAX.

 

Alternatively, you can use the Date.StartOfWeek() function in Power Query, where the second argument is where you would specify that Monday was your start-of-week day.

 

Pete



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

Proud to be a Datanaut!




Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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