cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adityavighne
Responsive Resident
Responsive Resident

week start on Wednesday

Hi Team,

 

I'm looking for weeknum should start on wednesday - tuesday

 

WeekNUM don;t have options. so how to acieve this.

 

regards,

Aditya

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@adityavighne , please find the calendar that start from any weekday

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

How to get custom week of year

Start Year = STARTOFYEAR('Date'[Date],"3/31") // Give correct year end date
WeekDay = WEEKDAY([Date],2) //monday, Use Wed code from link
Start of Week = [Date] -[WeekDay]+1 //monday , Use Wed code from link
FY Year = YEAR('Date'[Start Year]) // use end year
FY Week = QUOTIENT(DATEDIFF(Minx(FILTER('Date',[FY Year]=EARLIER([FY Year])),'Date'[Start of Week]),[Date],DAY),7)+1

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

5 REPLIES 5
harshnathani
Super User
Super User

HI @adityavighne ,

 

You can have a look at this blog.

 

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

 

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

FarhanAhmed
Super User
Super User

Hi @adityavighne 

 

One way to do it change the regional setting of your Windows to Start the Week from Wednesday

 

- Go to regional settings in windows

WeekStart-Wednesday.png

 

- Change the First Day of Week to "Wednesday"

 

WeekStart-Wednesday-2.png

 

Use the Format instead of WeekNum to get the WeekNumber  

WeekNum = FORMAT('Date'[Date],"WW")

 

- You will get the WeekNumber Starting from "Wednesday"

 

WeekStart-Wednesday-3.png







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

Proud to be a Super User!




amitchandak
Super User
Super User

@adityavighne , please find the calendar that start from any weekday

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

How to get custom week of year

Start Year = STARTOFYEAR('Date'[Date],"3/31") // Give correct year end date
WeekDay = WEEKDAY([Date],2) //monday, Use Wed code from link
Start of Week = [Date] -[WeekDay]+1 //monday , Use Wed code from link
FY Year = YEAR('Date'[Start Year]) // use end year
FY Week = QUOTIENT(DATEDIFF(Minx(FILTER('Date',[FY Year]=EARLIER([FY Year])),'Date'[Start of Week]),[Date],DAY),7)+1

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

@amitchandak 

 

very well written blog.

Thanks for the solution.

pranit828
Super User
Super User

Hi @adityavighne 

I would use the below function

 

 

WEEKDAY([date],13)

 

 




PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.