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
langer83
Frequent Visitor

Sorting Day of Week Names according to Date Desc

I made a column based off of a date column ( DayName = FORMAT([date],"ddd" ) and cannot not get this graph to sort by Date Desc. I also have a column with the #day of the month that I can possibly use. I can only get the graph to sort alphabetically. Any help is appreciated.

 

Capture.JPG

1 ACCEPTED SOLUTION

I ended up creating a column with the week number and day name (1: Mon, 2: Tues, .... ). Ideally, I wanted the data for the weekdays groupings to go in the order of the last dates from the top graph such as starting with Thurs on the far right then Wed to the left of Thurs, then Tues,... on the second graph and working back 7 days.

 

graph.JPG

View solution in original post

7 REPLIES 7
Baskar
Resident Rockstar
Resident Rockstar

Hi Langers , 

It too simple cool

 

1. U have to create week day, if u already have that is great , your prob solved 🙂

 

Choose your week day and move to modeling ribbon.

there u can find the option sort by column see the below image.

 

is sorting order u could choose the Weekday. Thats it

 

 

 

Sort By Column.PNG

 

Let me know its not working for u.

I attempted this and is is still not working for me. 
The days are still sorted alphabetically. 

Maybe you did the same thing I did. I have a column that is 1, 2, 3,... 7 and the other column is Mon, Tues, .... Sun. Highlight the Mon, Tues... column and then "Sort by Column" choosing the 1, 2, 3 column.

I ended up creating a column with the week number and day name (1: Mon, 2: Tues, .... ). Ideally, I wanted the data for the weekdays groupings to go in the order of the last dates from the top graph such as starting with Thurs on the far right then Wed to the left of Thurs, then Tues,... on the second graph and working back 7 days.

 

graph.JPG

Thank you for the solution. It helped me alot.

healthEteam
Resolver I
Resolver I

Try going into the data section of your power bi desktop.

Highlight the column with the day names and then click on the Sort By Column.

 

Sort By Column.PNG

 

This will popup all of the columns in your dataset.... choose the column that has the day numbers.

Once you go back to your graphic it should be sorted properly.

samdthompson
Memorable Member
Memorable Member

i have struggled with this too and found the best way till its sorted by MS is to go day_of_week_number&") "&Day_name. that way its text but sorted by the number 

// if this is a solution please mark as such. Kudos always appreciated.

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.

Top Solution Authors