Weeknum not filtering correctly with Year

WxShady13

Board Regular
Joined
Jul 24, 2018
Messages
185
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I sort my data by WeekNum (51,52,53,2) however with the New Year it is not working. I have created a concatenated column Year/Weeknum(202052,20212) but it still does not sort right. It shows blank weeks that would not exist (202060). How do I continue to display by Week # but keep it so it flows into the proper order based on Year?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi WxShady13,

At the beginning of the year the week will be a single digit so you would need to put a leading zero, e.g.

Book2
EFGHI
1DateWeeknumConcat
212/20/202152202152
312/27/202153202153
41/3/20222202202
51/10/20223202203
61/17/20224202204
Sheet1
Cell Formulas
RangeFormula
G2:G6G2=WEEKNUM(E2)
I2:I6I2=YEAR(E2)&TEXT(WEEKNUM(E2),"00")
 
Upvote 0
Thank you for the quick response. My formulas are in Power BI and I have the Weeknum pulled like you show. The change I have for the Concat column is below.
I formatted the WeekYearCombo column as Whole Number but it still does not work. What am I doing wrong?

WeekYearCombo = Year(Table1[Date]) & FORMAT(WEEKNUM(Table1[Date],1),"00")
 
Upvote 0
update your profile about Excel version, OS and Power Tools
in the first post, mention what you are using because as you can see it's not that obvious
 
Upvote 0
Sometimes people posting here by mistake so will be better if you do that - less troubles and wasted posts
 
Upvote 0
Thank you for the information, I will update immediately :)
 
Upvote 0

Forum statistics

Threads
1,223,749
Messages
6,174,286
Members
452,554
Latest member
Louis1225

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top