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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ADSL
Post Prodigy
Post Prodigy

Sorting the Column Name

Hi BI Community Team,

 

I have created the new column name "time session" but after tried to build the visual and it didn't sort/range as the screenshot below.

2023-07-22_17-01-19.png

Any suggestion to sort/rang it?

 

Thanks and Regards,

1 ACCEPTED SOLUTION
olgad
Super User
Super User

Hi, create another column

 

Time Session_Index = SWITCH(TRUE(),
[Log_In] < TIME(8,0,0), 1,
[Log_In] < TIME(12,0,0), 2,
[Log_In] < TIME(13,30,0), 3,
[Log_In] < TIME(17,30,0), 4,
[Log_In] < TIME(21,0,0), 5, 6)
 
Then, click on the first column, go to column tools, select sort by column and sort by time_session_index

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

View solution in original post

2 REPLIES 2
olgad
Super User
Super User

Hi, create another column

 

Time Session_Index = SWITCH(TRUE(),
[Log_In] < TIME(8,0,0), 1,
[Log_In] < TIME(12,0,0), 2,
[Log_In] < TIME(13,30,0), 3,
[Log_In] < TIME(17,30,0), 4,
[Log_In] < TIME(21,0,0), 5, 6)
 
Then, click on the first column, go to column tools, select sort by column and sort by time_session_index

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Hi @olgad,

 

Thank you very much for your helpful feedback.

 

Best Regards,

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.