Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Team,
I have a fisweek column and the data looks something like this 2020406,2020407, etc year & week now I need to create a date column which gives saturday date of the week based on the week number.
Thanks!
Raki
Solved! Go to Solution.
Hi @Anonymous ,
Assuming your input data is 8-character long text in yyyymmdd format, you can use this DAX calculation in a calculated column, to calculate the saturday date of the given week. It does not even need the week number 😉
saturdayofweek =
VAR _year = LEFT(dates[date],4)
VAR _month =LEFT(RIGHT(dates[date],4),2)
VAR _day = RIGHT(dates[date],2)
VAR fulldate = DATE(_year,_month,_day)
VAR dayofweek = WEEKDAY(fulldate)
VAR diff_to_sat= 6-dayofweek
VAR sat_of_week = fulldate + diff_to_sat
RETURN
sat_of_week
If your input data is in a different format you might need to tweak the _year, _month and _day cariables to extract the year, month and day, to construct the date in date format correctly. If your data is in date format already, you can also just use a direct column reference to your date column instead of the fulldate variable, and it should work (then you can remove the other vars before that).
Let me know if you have any questions.
Proud to be a Super User! | |
Hi @Anonymous ,
Assuming your input data is 8-character long text in yyyymmdd format, you can use this DAX calculation in a calculated column, to calculate the saturday date of the given week. It does not even need the week number 😉
saturdayofweek =
VAR _year = LEFT(dates[date],4)
VAR _month =LEFT(RIGHT(dates[date],4),2)
VAR _day = RIGHT(dates[date],2)
VAR fulldate = DATE(_year,_month,_day)
VAR dayofweek = WEEKDAY(fulldate)
VAR diff_to_sat= 6-dayofweek
VAR sat_of_week = fulldate + diff_to_sat
RETURN
sat_of_week
If your input data is in a different format you might need to tweak the _year, _month and _day cariables to extract the year, month and day, to construct the date in date format correctly. If your data is in date format already, you can also just use a direct column reference to your date column instead of the fulldate variable, and it should work (then you can remove the other vars before that).
Let me know if you have any questions.
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 130 | |
| 103 | |
| 58 | |
| 39 | |
| 31 |