Forum Discussion

deepak1306's avatar
deepak1306
New Member
3 years ago
Solved

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 ? 

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

    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:

     

    I hope it helps!

1 Reply

  • mlsx4's avatar
    mlsx4
    Icon for Memorable Member rankMemorable Member

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

    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:

     

    I hope it helps!