Forum Discussion
Week Start Dating Not Calculating Correctly
All reports use dates, so it is very important that power Bi developers learn how to use Calandar tables.
Try this ....
Click here to download PBIX from OneDrive
How it works ...
Create a calendar table
Calendar = CALENDAR(DATE(2023,01,01),DATE(2024,12,31))
Add a start of week column (I have used Monday)
Start of week = 'Calendar'[Date] - WEEKDAY('Calendar'[Date],2) + 1
Add a week offset column
Week offset = DATEDIFF(TODAY() - WEEKDAY(TODAY(),2) + 1,[Start of week],DAY) / 7
This will refresh each time your data is refeshed to give you the week offset
Create Calandar date to Fact date one to many relationship
Build your report and add a filter to just shoiw the week offset you need.
This example just shows the last 5 weeks, but you can choose just one week if you wish
To learn more about Calendars watch these videos
https://www.youtube.com/watch?v=BtYn1hfdSAM
Thanks for the clear description of the problem with example data. I wish everyone did that!
Remember we are unpaid volunteers, and you have got free expert help which took a lot of effort,
This solution works and does exactly what you asked.
So please quickly click the [accept as solution] and the thumbs up button to leave kudos.
One question per ticket please. If you need to change or 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 !
If you quote speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.
Please now click the [accept as solution] and the thumbs up button. Thank you.