The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.