Forum Discussion
My X axis date column in weeks
- 1 year ago
Create a Week Start Date (Monday)
WeekStartDate =
'Date'[Date] - WEEKDAY('Date'[Date], 2) + 1
-This ensures every date maps to the Monday of its week.
-WEEKDAY(..., 2) makes Monday = 1, Sunday = 72. Generate a Sortable Week Index Across Years
WeekIndex =
YEAR('Date'[WeekStartDate]) * 100 + WEEKNUM('Date'[WeekStartDate], 2)
- This gives you values like 202401, 202402, etc.
- Ensures proper chronological sorting across years.3. Create Display Format: WeekNo (Month)
WeekLabel =
"W" & WEEKNUM('Date'[WeekStartDate], 2) & " (" & FORMAT('Date'[WeekStartDate], "MMM") & ")"- Example: W32 (Aug)
4. Sort the Display Column by WeekIndex
In Power BI:
- Go to the WeekLabel column.
- Use "Sort by Column" → select WeekIndex.
Hi asheyashey
I would also take a moment to thank Shahid12523 , MohamedFowzan1 , rohit1991 , FBergamaschi for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Best Regards,
Harshitha.
Yes, I did find a solution.Thank you everyone for your inputs.