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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
VK_nz
Helper I
Helper I

Weeks group sorting

Hi all,

 

Appreciate hepl pointing in right direction.

I have blow matrix for each week - starting on Monday for multiple financial years (July to June).

How do I sort weeks Ascending to show most recent at the top? 

image.png

 

I have tried week no. and formating which does give me sorting but then it only shows week-1, week-2 and not the actul week group with start and end date as above table

 

image.png

File link: https://www.dropbox.com/scl/fi/akylh4hwb1gcqbiuqg5ig/ActivityAnalysis.pbix?rlkey=r4fvp8immzsscdlwx2y...

 

2 ACCEPTED SOLUTIONS
tharunkumarRTK
Super User
Super User

@VK_nz 

You can follow this approach:

Screenshot 2024-09-07 at 6.17.52 PM.png

Screenshot 2024-09-07 at 6.18.37 PM.png

 

I am attaching the PBIX file below

Need a Power BI Consultation? Hire me on Upwork

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

 

 

View solution in original post

Hello @VK_nz , 

 

please try the below steps to get the week sort column by calculated column and sort the week group by this column..

 

Step 1 - Create Week Sort Column and make sure you make the data type as whole number.

 

dharmendars007_0-1725713797534.png

 

Step 2 - Sort the Week group column by "Week Sort" Column which you created.

 

dharmendars007_1-1725713878264.png

Now you view the Week group sorted in the Visual..

 

dharmendars007_2-1725713926186.png

 

There a much easier way to do in Power query but the above approch also works fine..

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

View solution in original post

8 REPLIES 8
VK_nz
Helper I
Helper I

@tharunkumarRTK  I got value for current week and want to plot previous week value side by side i.e. week 09/09 should have 78 in previous week column value :

Capture.JPG 

VK_nz
Helper I
Helper I

@tharunkumarRTK Thank you, exactly what i wanted.

tharunkumarRTK
Super User
Super User

@VK_nz 

You can follow this approach:

Screenshot 2024-09-07 at 6.17.52 PM.png

Screenshot 2024-09-07 at 6.18.37 PM.png

 

I am attaching the PBIX file below

Need a Power BI Consultation? Hire me on Upwork

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

 

 

VK_nz
Helper I
Helper I

Found solution by adding 

Week Start date = 'Calendar'[Date].[Date]+-1*WEEKDAY('Calendar'[Date].[Date],2)+1
as sorting column to week group
Ritaf1983
Super User
Super User

Hi @VK_nz 

Can you please share a pbix or some dummy data that keep the raw data structure with expected results, in your case just a calendar table? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you Rita, I have copied dropbox link for the calendar file. Appreciate your help.

While I have created week group with start date and end date of the week, I just cant get to sort it chronologically.

Hello @VK_nz , 

 

please try the below steps to get the week sort column by calculated column and sort the week group by this column..

 

Step 1 - Create Week Sort Column and make sure you make the data type as whole number.

 

dharmendars007_0-1725713797534.png

 

Step 2 - Sort the Week group column by "Week Sort" Column which you created.

 

dharmendars007_1-1725713878264.png

Now you view the Week group sorted in the Visual..

 

dharmendars007_2-1725713926186.png

 

There a much easier way to do in Power query but the above approch also works fine..

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

@dharmendars007 thank you

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors