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
farhandsome
Helper I
Helper I

PBI - Sorting by date in a weekly glance

Hi all,

 

I have some SQL DirectQuery data inputted into my PBI Desktop. The data has a date column ("mm/dd/yyyy") and some corresponding data in the subsequent columns. I wanted to get the data in a weekly glance (i.e. show the data by day from Monday - Friday of the current week).

 

To do this, I created a calculated column - assigning each date a day using the WEEKDAY() function. However, the days are sorting out of order. See the picture below:

 

PBI Day Sorting.PNG

 I made this column so that it would display the actual day instead of the integer representing it. As you can see, it is sorting out of order. Is there a way to sort it in the actual order?

 

Thanks,

Farhan

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @farhandsome ,

  1. Create a calculated column which holds the name of the weekday correponding to the weekday number.
  2. Select this calculated column > tab Column tools > Sort by column > weekday number (see figure)

Sort by columnSort by column

 

Regrads FrankAT

View solution in original post

2 REPLIES 2
FrankAT
Community Champion
Community Champion

Hi @farhandsome ,

  1. Create a calculated column which holds the name of the weekday correponding to the weekday number.
  2. Select this calculated column > tab Column tools > Sort by column > weekday number (see figure)

Sort by columnSort by column

 

Regrads FrankAT

camargos88
Community Champion
Community Champion

@farhandsome ,

 

Have you tried to sort the named day column by the numeric day column ?

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



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.