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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sri_phani
Helper III
Helper III

Get First Datetime and Last datetime

Hi,

 

I am having a challenge with PowerQuery. I have Activity-wise details, I have to find the Login & Logout from those activities. The first time registered in login and the last time registered is logout within that date. 

 

I tried with an approach of first grouping the data with Employee name and Date. But that is where I am stuck.

 

Example: Below is the grouped data and in the same screenshot raw data is there in table.  From this screenshot employee login will be 10/4/2024 3 AM and logout will be 10/4/2024 5 AM.

 

Sample data -  https://docs.google.com/spreadsheets/d/1gKxpcn6-lXejQt_pIew7irDKvf6yMbdH92YbsgT27zc/edit?usp=sharing

 

Sri_phani_1-1728485327039.png

 

Thanks in advance. 

 

 

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

Does changing your grouping settings as below get you the result you are looking for?

jgeddes_0-1728504196144.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
Sri_phani
Helper III
Helper III

Thank you very much. It helped. 

jgeddes
Super User
Super User

Does changing your grouping settings as below get you the result you are looking for?

jgeddes_0-1728504196144.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.