Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I have a column with a year and week number (for example 2021 - 4) as a string. I want to use this (or a new one) for filtering and showing time-based results, so I have to make a date out of them. I found https://docs.microsoft.com/en-us/dax/date-function-dax online, but it doesn't discuss the week numbers. How do I handle weeks?
Solved! Go to Solution.
@Anonymous , Based on space I saw, suggesting, adjust a bit
Week to Date = var _st = date(left([Week],4),1,1)
var _week = right([Week],len(Week)- 6)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1
Also, refer
Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
Hi @Anonymous,
You can create a calendar table with date fields and year week number fields, then you can use this date field to link the fact table dates which you wanted to filter. After these steps, you can use the year week field as the source of slicer to filter records.
Regards,
Xiaoxin Sheng
@Anonymous , Based on space I saw, suggesting, adjust a bit
Week to Date = var _st = date(left([Week],4),1,1)
var _week = right([Week],len(Week)- 6)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1
Also, refer
Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 81 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |