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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
umekuro
Helper II
Helper II

Week number for the entire year that moves forward from month to month.

Hi,

I have a calendar table I created in PowerQuery.
I want to add to it a column for week number with the following conditions
Using the Date.WeekOfMonth function, I was able to get the week number in months, but when the month changes, it starts from 1, which is not the way I want it.
How can I add a column to the calendar table in PowerQuery with the following conditions
-Week number of the year in total
-Monday begins on Monday and ends on Sunday
-the week number is carried forward when the month changes
-When the year changes, it starts from 1.


Thank you in advance!

 

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @umekuro ,

 

Have you tried using the Date.WeekOfYear function?

Date.WeekOfYear([Date], Day.Monday)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thank you,Pete!


Yes, I used the Date.WeekOfYear function, 
but, this function returns the week number across the month, which is not what I am looking for.
I want it to replace the next week number when the month changes.
Of course, the number of week numbers per year will be more than 52, but I need such a week number.

Thanks a lot for your advice.

Hi @umekuro, provide sample data (Date column) and expected week number result please.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors