Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I have a data for employees where they check in and check out everytime they enter the building. I want to calculate the time duration per day (I have a date slicer)
For instance here I want to subtract 5:55pm from 7:59am to get 9hrs 56min total hours.
I appreciate any help!
Solved! Go to Solution.
Hi, @Alanoudfahad
Please check the below picture and the measure.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @Alanoudfahad
Please check the below picture and the measure.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Works wonderfully, thanks!
@Alanoudfahad , Try a new column like
var _max = if([In/out] = "Out" , max(filter(Table, [Date] =earlier([Date]) && [Id] =earlier([ID]) && [In/out] ="In" && [Time] <earlier([Time])),[Time]), blank())
return
if([In/out] = "Out" && not(isblank(_max)) , datediff(_max, [Time], minute))/60
Ideally in place of time you should use date time column
date time =[date]+[time]
Hi @amitchandak It gives me this error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value." even after crreating date/time column
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |