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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
i created 2 columns (week start date, and weeknum) based on a creationdate (format 08/11/2022 10:51:20)
I start the week on a fri and end on a thursday with the following:
Solved! Go to Solution.
Hi @TechR21 - DAX does not have a Start of Week function, so this is reason why I suggested using Power Query instead. If you need to use DAX you could consider the following:
Week Start date(Fri-Thu) =
VAR _datetime = 'Incidents'[created]
/"Friday will equal 1*/
VAR _day = WEEKDAY( _datetime , 15 )
/*This returns the start of week based on Friday
VAR _StartOfWeek =
IF (
AND( _day = 1 , HOUR ( _datetime ) >= 17 ),
DATE( YEAR( _datetime) , MONTH( _datetime) , DAY( _datetime ) ),
IF ( AND( day = 1, HOUR ( _datetime ) < 17 ),
DATE( YEAR( _datetime) , MONTH( _datetime) , DAY( _datetime ) ) - 7,
DATE( YEAR( _datetime) , MONTH( _datetime) , DAY( _datetime ) ) - _day + 1
)
RETURN
_StartOfWeek
Hi @TechR21 - DAX does not have a Start of Week function, so this is reason why I suggested using Power Query instead. If you need to use DAX you could consider the following:
Week Start date(Fri-Thu) =
VAR _datetime = 'Incidents'[created]
/"Friday will equal 1*/
VAR _day = WEEKDAY( _datetime , 15 )
/*This returns the start of week based on Friday
VAR _StartOfWeek =
IF (
AND( _day = 1 , HOUR ( _datetime ) >= 17 ),
DATE( YEAR( _datetime) , MONTH( _datetime) , DAY( _datetime ) ),
IF ( AND( day = 1, HOUR ( _datetime ) < 17 ),
DATE( YEAR( _datetime) , MONTH( _datetime) , DAY( _datetime ) ) - 7,
DATE( YEAR( _datetime) , MONTH( _datetime) , DAY( _datetime ) ) - _day + 1
)
RETURN
_StartOfWeek
Im getting the following error:

Sorry I missed an "_" before day on Row 8
Yes now it working, and exactly the results I expected! Thank you so much!
Hi @TechR21 - I would like to recommend using Power Query to add a new column which returns the StartOfWeek. Something like the following:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dc8xCsAgEETRu1gr7ExMFM+RTrz/NZIyAT9s9Zs3O2dy2EUqilt1RLyXVv73E/oFvUHvuy5wBa7AFbgC1+Ae4Na9a/jX3z3rAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type datetime}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Week Beginning", each if
Date.DayOfWeek( [Column1] , Day.Friday ) = 0
and
Time.Hour( Time.From( [Column1] ) ) >= 17
then
Date.From( Date.StartOfWeek([Column1] , Day.Friday ) )
else
Date.From( Date.StartOfWeek([Column1] , Day.Saturday ) ) - #duration(1, 0, 0, 0)
, type date)
in
#"Added Custom"
thank you, but I really just want to add the time in my previous created column as asked. If not possible I can try other things.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 72 | |
| 46 | |
| 35 |