Forum Discussion
Last Friday - Power Query
Hi,
How can I get last Friday date for any given date in a Custom Column of Power Query please?
Today is 28/07/2021 so last Friday date was 23/07/2021.
Thanks
mb0307 add a new column in PQ using the following M code:
Date.AddDays([DateColumn],-Date.DayOfWeek([DateColumn],5)))✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
2 Replies
- parry2kSuper User
mb0307 add a new column in PQ using the following M code:
Date.AddDays([DateColumn],-Date.DayOfWeek([DateColumn],5)))✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- mb0307Responsive Resident
Perfect