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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How do I get the time to sort by order rather than by the value?

lea_c19cud_0-1636048474491.png

I would like for the time to start from midnight to the last hour I have (8:00pm/20:00). How do I get it to sort that way?

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

You can take a look at the following to add a custom 'sort order' table to specify the order of your table records. 

Custom Sorting in Power BI 

You can add a custom column to extract the hour value and create a custom table from 0 to 23 and set the sort order with offset 8 as index and link to raw table 'hour' column.

Regards,
Xiaoxin Sheng

lbendlin
Super User
Super User

Add a calculated column that shows the number of minutes passed in a day until your interval time. Then sort your interval column by that new column. If you get a circular reference error you can add the new column in Power Query instead.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.