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
Anonymous
Not applicable

Sort table visual based on a column that has dates where some days are null

I have a table visual that I would like sorted from oldest to newest but some of the rows contain null. How do I sort to force the nulls to be last and the oldest date (where there is a date) to be first?

 

Here it sorts oldest to newest...but I want to go newest to oldest

big to small.png

 

If I do the sort from newest to oldest,  I get blank rows. I want the blank rows to display but I want them at the end

newest to oldest.png

 

 

 

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Greg_Deckler
Super User
Super User

Well perhaps create a new column and if the column is null, make it 1/1/9999 as a date, otherwise just the date from the column. Sort on this new column.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Tad17
Solution Sage
Solution Sage

Hey @Anonymous 

 

check out the two threads below and see if they help:

 

https://community.powerbi.com/t5/Desktop/handling-blanks-in-tables-and-matrix/td-p/337041

 

https://community.powerbi.com/t5/Desktop/sort-by-ascending-values-with-non-blanks-on-top/td-p/689199

 

If these help please kudo.

Ifthey solve your problem consider accepting this post as possible solution.

 

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.