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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
damit23183
Microsoft Employee
Microsoft Employee

Sorting on Start of Week not working

Hi,

 

I have one Line and Stach chart created based on StartofWeek (DD/MM) and 2 measures.

 

StartofWeek Dates are: 12/06,03/07,10/07,17/07.24/07,31/07 and so on Every Sunday.

 

I am trying to sorting this out like you see above but somehow sorting is not working at all. I am getting this sequence;

 

31/07/28/08,25/09,24/07 (random Sequence).

 

I want like this;

12/06,03/07,10/07,17/07.24/07,31/07

 

I have tried below combination with custom columns using DAX

1) YearQuarterMonth ; e.g 20220101.....20220204 etc

2) YearMonth; e.g 202201,202202,202203 etc

3) YearMonthWeekNumber: 20220101,20220102.....20221251.

4) YearMonthWeekDay: 2022010101,2022010102.....etc

 

None of them are working. All above columns are created using DAX formula.

 

Any Help would be appreciated.

 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@damit23183 , Hope you create two columns like

 

Week Start Date= [Date] - Weekday([Date],1) +1 

Week = Format([Week Start Date], "dd/mm")

 

Then mark Week Start Date as a sort column of the week

How to Create Sort Columns and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

 

Sort Month Year.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@damit23183 , Hope you create two columns like

 

Week Start Date= [Date] - Weekday([Date],1) +1 

Week = Format([Week Start Date], "dd/mm")

 

Then mark Week Start Date as a sort column of the week

How to Create Sort Columns and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

 

Sort Month Year.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

 

Thanks it worked perfectly fine. 

 

Thank you So much.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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