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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JacquesFM
New Member

Ordering of Months & Weeks

Hi Guys

 

I am fairly (very) new to Power BI and still learning the ropes. My question relates to the sorting of my data by Power BI, specifically on how to stop/change the Power BI sorting. I have read through numerous forum messages and solutions (and tried to apply them), but with no success. I know that several users have raised this issue, and I apologise in advance for any repitition of questions taking place!

 

Here is my issue. My imported data is sorted according to Weeks, starting at Week 40. My year then runs to Week 39 of the next year. I want Power BI to keep my data as is (when imported), or I want to re-order my data then if I can't stop Power BI from doing it automatically. So far I have failed to do either.

 

Here is my data when imported:

 

Data SheetData Sheet

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here is the Graph that I created from the imported Data Sheet as above:

 

GraphGraph

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As can be seen, my graph starts at Week 1 and follows its own order, where I want it to start at Week 40 as per my data sheet. In my data sheet I have edited my sheet so that the data is sorted according to the column "Correct Order" and I have hidden that colum from being viewed on the graph, but the order still didn't change. I have the same problem with my Months, but I take the same logic will apply there, so I have just raised the Week issue for now.

 

If anyone can help me, it will be greatly appreciated!

 

Kind Regards,

Jacques 

3 ACCEPTED SOLUTIONS
jthomson
Solution Sage
Solution Sage

When you say you've sorted it into the correct order, where exactly did you do it? Have you tried picking your Week column, going into the Modelling section at the top and then selected Sort by Column (and choosing correct order from there)?

View solution in original post

SteveCampbell
Memorable Member
Memorable Member

You could make a table as such:

 

WeekOrder
Week 401
Week 412
Week 423
Week 434
Week 445
Week 456
Week 467
Week 478
Week 489
Week 4910
Week 5011
Week 5112
Week 5213
Week 5314
Week 115

 

...Up to week 39.

 

Make sure it goes to week 53. You can join this to your table on the "Week" Column. Call the Order into your current table using:
Order = Related(Order Table[Order]

 

Then you can use Sort By Column in the Modelling Tab. Select your Week column and sort by Order (in your original table).



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



View solution in original post

v-shex-msft
Community Support
Community Support

Hi @JacquesFM,

 

Have you try to use 'sort by column' feature to setting custom sorting column?

Sort by column in Power BI Desktop

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
JacquesFM
New Member

Hey Guys Thank you for the comments and inputs, appreciated! I have managed to get it right this time round - seemed that I didn't do the sorting part correct, but corrected it now, thanks to your input. Once again thank you! Kind Regards, Jacques
v-shex-msft
Community Support
Community Support

Hi @JacquesFM,

 

Have you try to use 'sort by column' feature to setting custom sorting column?

Sort by column in Power BI Desktop

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
SteveCampbell
Memorable Member
Memorable Member

You could make a table as such:

 

WeekOrder
Week 401
Week 412
Week 423
Week 434
Week 445
Week 456
Week 467
Week 478
Week 489
Week 4910
Week 5011
Week 5112
Week 5213
Week 5314
Week 115

 

...Up to week 39.

 

Make sure it goes to week 53. You can join this to your table on the "Week" Column. Call the Order into your current table using:
Order = Related(Order Table[Order]

 

Then you can use Sort By Column in the Modelling Tab. Select your Week column and sort by Order (in your original table).



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



jthomson
Solution Sage
Solution Sage

When you say you've sorted it into the correct order, where exactly did you do it? Have you tried picking your Week column, going into the Modelling section at the top and then selected Sort by Column (and choosing correct order from there)?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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