cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Re: How to calculate week number?

Thank you @dionmills_argos,

I was looking for this. I will try it tomorrow 🙂

 

AUPowerappps
Level: Powered On

Re: How to calculate week number?

hello,

i am french,i need a formula to calculate week number calendar European.

 

Best regards,

Audric.

The_Hawk
Level: Powered On

Re: How to calculate week number?

Thank you dionmills_argos it helped a lot !

datamaster
Level 8

Re: How to calculate week number?

This worked great after I replaced all the ";" and replaced them with ",". Also I replace the datapicker with today() to get today's weeknumber.

DennisO
Level: Powered On

Re: How to calculate week number?

I've attached my solution for calculating the week number based off of Today().  All the examples looked like fun so I wanted to try my hand as well.  Only minor testing performed but it seems to work.  How it works is:

- Find the number of days between the current date and the first of the year using DateDiff

- Add the day of the week for the first of the year using "WeekDay"

- Divide by 7

- Round Up

 

RoundUp((DateDiff(DateValue(Concatenate("1/1/", Text(Year(Today())))), Today()) + Value(WeekDay(Concatenate("1/1/", Text(Year(Today())))))))/7,0)

Super User
Super User

Re: How to calculate week number?

Hello DennisO,

Thank you for sharing.
I copy paste the expression but I receive an error. Are you sure it works? Can you copy paste what you have posted and try it, please?

AUPowerappps
Level: Powered On

Re: How to calculate week number?

Weekk number ISO:

 

RoundDown((RoundUp(selec.SelectedDate-Date(Year(selec.SelectedDate-Weekday(selec.SelectedDate-1)+4);1;3);0)+
Weekday(Date(Year(selec.SelectedDate-Weekday(selec.SelectedDate-1)+4);1;3))+5)
/7;0)

 

selec=datepicker or label

Spoiler
remove ; , if need

View solution in original post

The_Hawk
Level: Powered On

Re: How to calculate week number?

Hi AUPowerapps,

 

It works perfectly ! Thank you !

ShivamJindal
Level: Powered On

Re: How to calculate week number?

I am trying to use this formula with a date picker and 1,1 as suggested by you and getting a -ve week value. . . For the first week on tear it is ok. . And in the second week it says "0" and after that -ve. can you please help.

venseben
Level: Powered On

Re: How to calculate week number?

This solution rocks. THX a 1000 times @AUPowerappps 

 

Frank

Denmark

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,629)