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
bourne2000
Helper V
Helper V

How to sort week end date in the date table?

Hi

 

I have below date table

 

bourne2000_0-1674267566648.png

 

 

I created Week End date using this dax measure

Week End Date = 'Date'[Date] - WEEKDAY('Date'[Date],2) + 7

 

I need to sort the week end date, as I build the bar chart using week end date as an axis but it's not sorted out

 

bourne2000_1-1674267684016.png

 

Can anyone advise the following?

 

1) How to sort the week end date?

2) Hot to format week end date into "MM/dd/YYYY"

 

 

 

 

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @bourne2000 

Click the End Date column, then change it date type to short date

 

 

vxinruzhumsft_2-1674546989921.png

 

Then put the column to the axis.

and use the sort function in visual

vxinruzhumsft_3-1674547039843.png

 

Output:

vxinruzhumsft_4-1674547067787.png

Best Regards!

Yolo Zhu

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

View solution in original post

4 REPLIES 4
v-xinruzhu-msft
Community Support
Community Support

Hi @bourne2000 

Click the End Date column, then change it date type to short date

 

 

vxinruzhumsft_2-1674546989921.png

 

Then put the column to the axis.

and use the sort function in visual

vxinruzhumsft_3-1674547039843.png

 

Output:

vxinruzhumsft_4-1674547067787.png

Best Regards!

Yolo Zhu

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

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
FreemanZ
Super User
Super User

hi @bourne2000 

1) try to click the "...", sort by

https://learn.microsoft.com/en-us/power-bi/consumer/end-user-change-sort

2)

try like:

Week End Date = FORMAT('Date'[Date] - WEEKDAY('Date'[Date],2) + 7, "mm/dd/yyyy")

@FreemanZ  Thanks. I used the measure and it changed into mm/dd/yyyy. However, it is not sorting. I used sort by but it's not showing correct sort. I have data from 2022 to 2023. It showing mixed axis

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.