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
peifc75
Frequent Visitor

Calculate time differences (multiple dates) in the same column filter by name in different column

I hope someone can help. I have searched many places to hope for an answer.

 

I have this data, a column contains date and time. Another column has usernames. What I need to do is to count all of the same hour and date under the same user as equal to 1 hour. Example, below Ferdinand logged online on 1/1/23 with different minutes of the same hour at 3 pm will consider as 1 hour.

 

peifc75_0-1704210587739.png

 

Anyone with a solution for this question I have, I truly appreciate. I have been wrecking my brain for awhile now.

 

Thank you in advance.

1 ACCEPTED SOLUTION
peifc75
Frequent Visitor

Thank you so much for your help. This is what my boss is looking for.

View solution in original post

2 REPLIES 2
peifc75
Frequent Visitor

Thank you so much for your help. This is what my boss is looking for.

Ritaf1983
Super User
Super User

Hi @peifc75 
You can split the column to date and time and use a dim timetable with the needed slots.
For more information, please refer to the linked video :
https://www.youtube.com/watch?v=-q7v56p192M&t=2s

or (less recommended solution) from PQ add column from example to the date time column :

Ritaf1983_0-1704216595229.pngRitaf1983_1-1704216739158.png

Than you will get a column with a fixed date time to hours and use it as filter

Ritaf1983_2-1704216939875.png

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.