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
deepak1306
New Member

Sorting Timestamp values from 6PM to 6AM in a visual

I have a column with timestamp in HH:MM:SS format. I want to sort the visuals based on a condition that if Shift = Day, then sort timestamp from 6AM to 6PM, else if Shift = Night, then sort timestamp from 6PM to 6AM. I want to apply this sorting on a visual. I was able to achieve this via Power Query and sort the backend data but does not reflect on the visuals. 

 

I need a sorting index column to sort the LocalTime column on. Can someone please guide ? 

1 ACCEPTED SOLUTION
mlsx4
Memorable Member
Memorable Member

You can create a column in Power Query. Select the hour field > Add column > Hour>Hour>Hour

mlsx4_1-1688109164723.png

You will obtain a column as the one in the right


And then, click on your hour column and select sort by the new created column:

mlsx4_0-1688109093282.png

 

I hope it helps!

View solution in original post

1 REPLY 1
mlsx4
Memorable Member
Memorable Member

You can create a column in Power Query. Select the hour field > Add column > Hour>Hour>Hour

mlsx4_1-1688109164723.png

You will obtain a column as the one in the right


And then, click on your hour column and select sort by the new created column:

mlsx4_0-1688109093282.png

 

I hope it helps!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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