Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I need to calcualte two datetime stamp difference with the working hour consideration.
I have extracted the time (field name: TMS[Arrived_time]) from the datetime stamp,like:
16:40:00, 08:00:00, ,,,,,,,
working hour start at 08:30:00, end at 23:00:00
but when i write the fuction like below:
If_working_hour_flag_arrived = if(and(TMS[Arrived_time]>=TMS[Working_hour_Start],TMS[Arrived_time]<=TMS[Working_hour_End]),1,0)
the result are all 0,
but for TMS[Arrived_time] =16:40:00, the result should be 1.
Anyone have some thoughts?
Solved! Go to Solution.
You may add TIMEVALUE Function to convert to a time.
You may add TIMEVALUE Function to convert to a time.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
38 | |
29 | |
28 |
User | Count |
---|---|
99 | |
88 | |
62 | |
42 | |
39 |