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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors