Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
vjnvinod
Impactful Individual
Impactful Individual

week start date and week end date

Hi 

 

I need to calculate week start date and week end date for  a calendar i am trying to build

my week starts on Saturday and week ends on Friday

 

I used week day function but i am getting error of year 1900 or something like that, see below screenshot

could you please help me how to find my week start date and week end date?

 

Capture.PNG

1 ACCEPTED SOLUTION

pls try this
Column = if(MONTH('Date'[Start])=7,"P1",if(month('Date'[Start])=8,"P2"))
week = "Wk"&roundup(('Date'[Date]-MIN('Date'[Date])+1)/7,0)
1.PNG
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

11 REPLIES 11
ryan_mayu
Super User
Super User

@vjnvinod 

try to change the datatype to whole number

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




vjnvinod
Impactful Individual
Impactful Individual

@ryan_mayu 

 

that doesn't give me week start date 

i am trying to create a coloumn for Week start date & week End date, my week starts with saturday and Week ends with Friday

how do i write this formula

I tried something like this, doesn't calcualtes correctly

Week Start Date = 'Date'[Date]+6-WEEKDAY('Date'[Date],1)

@vjnvinod 

what's the expected output? shows "start" for weekstart date and "end" for weekend date?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




vjnvinod
Impactful Individual
Impactful Individual

@ryan_mayu 

 

see below table with output coloumn

my date calendar in power bI

Date = CALENDAR(date(2021,07,03),date(2022,06,30))

 

Date(Input)week Starting Date outputweek Ending Date output
3 July, 20213 July, 20219 July, 2021
4 July, 20213 July, 20219 July, 2021
5 July, 20213 July, 20219 July, 2021
6 July, 20213 July, 20219 July, 2021
7 July, 20213 July, 20219 July, 2021
8 July, 20213 July, 20219 July, 2021
9 July, 20213 July, 20219 July, 2021
10 July, 202110 July, 202116 July, 2021
11 July, 202110 July, 202116 July, 2021
12 July, 202110 July, 202116 July, 2021
13 July, 202110 July, 202116 July, 2021
14 July, 202110 July, 202116 July, 2021
15 July, 202110 July, 202116 July, 2021
16 July, 202110 July, 202116 July, 2021

@vjnvinod 

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




vjnvinod
Impactful Individual
Impactful Individual

@ryan_mayu 

 

This is awesome, thanks so much

i need 2 more additional coloumn one for

month which starts from July, that should be P1, if its August P2 and so on ..

and week accordingly, in the format Wk1, Wk2, Wk3, Wk4 , so on

pls try this
Column = if(MONTH('Date'[Start])=7,"P1",if(month('Date'[Start])=8,"P2"))
week = "Wk"&roundup(('Date'[Date]-MIN('Date'[Date])+1)/7,0)
1.PNG
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




vjnvinod
Impactful Individual
Impactful Individual

@ryan_mayu 

 

This is so cool, thanks so much, it worked like charm

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Greg_Deckler
Community Champion
Community Champion

@vjnvinod Week Starting - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

 

thanks for the share, very overwhelming for me

I just need a simple formula to calculate week starting day and week ending day

week starts on saturday and week ends on friday

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors