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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Sort Table Data by Week

Hi Team,

I have a table with regular dates a data has been recorded. However I want them to show as weeks similar to what you're seeing in the screenshot below:

4b36c5e7-08f9-4974-a577-90d518a0ba57.png

 

Let me know if this is possible or not.

Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Removed, Added and Difference is a column in table?

 

You can create new columns like in date table format the way you need

 

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1 //,2 means Monday week
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

 

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

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

If you want to change it to become that Sunday will be the start of the week, you can change the second parameter of the WEEKDAY() function to 1, it will make Sunday become the start of the week in your calendar table, like this:

v-robertq-msft_0-1617262876511.png

 

And you can get what you want.

You can download my test pbix file here

More info about the WEEKDAY() function in DAX

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Removed, Added and Difference is a column in table?

 

You can create new columns like in date table format the way you need

 

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1 //,2 means Monday week
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

 

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
Anonymous
Not applicable

This worked! 

Follow-up question, how do I change it that Sunday will be the start of week?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.