Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Is there a simple DAX expression that calculates the start date of the previous week?
Solved! Go to Solution.
It is bad practive to use DAX for date intellence.
Use a Calendar table instead.
In Power Query
add a start of week column using Date. StartOfWeek
then create a week offset with 0 for this week, -1 for last week, -2 for pervious week
You can then slice and dice by the offset and use it is calculation function.
Click here to learn about Power Bi calendars
all reports use dates, so it is really important that you learn about calendars and offsets
Thanks for reaching out for help.
I put in a lot of effort to help you, now please quickly help me by giving kudos.
Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.
If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime. I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
Yes, you can use start of week function to get th date for the monday.
Hi @obriaincian ,
Whether the advice given by @speedramps has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
It is bad practive to use DAX for date intellence.
Use a Calendar table instead.
In Power Query
add a start of week column using Date. StartOfWeek
then create a week offset with 0 for this week, -1 for last week, -2 for pervious week
You can then slice and dice by the offset and use it is calculation function.
Click here to learn about Power Bi calendars
all reports use dates, so it is really important that you learn about calendars and offsets
Thanks for reaching out for help.
I put in a lot of effort to help you, now please quickly help me by giving kudos.
Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.
If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime. I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
Referring you to this article might help you
https://bielite.com/blog/week-start-date-power-bi-dax/
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!