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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MPetramalo214
Helper I
Helper I

How to make weekly line chart show in date order, not alphabetical order

I have a line chart that uses rolling 90 days of data - now that there is a new year of data in the set though; the line chart shows this week at the front instead of the end.  I've tried sorting the column by date, but because there is more than one date per week; it won't let me.  Does anyone know of a way to sort this the way I need to?

 

Graph:

MPetramalo214_0-1641398897841.png

^ Notice how Week 0 is shown at the front of the graph, instead of at the end; where it falls in relation to the other dates

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@MPetramalo214 , you should sort week name on week start date

 

example

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

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

Our weeks start on Tuesday for all of our reporting - is there a way to make the formula reflect that?  I tried adjusting it to 'Date'[Date]+1-1*WEEKDAY('Date'[Date],2)+1 which makes it reflect that weeks Tuesday as the first day of the week; but still includes the previous weeks Monday.

MPetramalo214_0-1641400537377.png

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@MPetramalo214 , you should sort week name on week start date

 

example

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

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Our weeks start on Tuesday for all of our reporting - is there a way to make the formula reflect that?  I tried adjusting it to 'Date'[Date]+1-1*WEEKDAY('Date'[Date],2)+1 which makes it reflect that weeks Tuesday as the first day of the week; but still includes the previous weeks Monday.

MPetramalo214_0-1641400537377.png

 

Nevermind, I was able to figure it out! For anyone curious - change the Weekday formula to reflect WEEKDAY('Date'[Date] -2)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.