Forum Discussion
match values between 2 dates
- 5 years ago
Hi guilherme93silv ,
Try the following formula:
Shift ID = CALCULATE( MAX(Shift[Shift ID]), FILTER( Shift, Shift[starttime] <= Alarm[starttime] && Shift[endtime] >= Alarm[endtime] ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
To identify Shift Id, should the StartTime(Alarm) between StartTime(Shift) and EndTime(Shift)? Or
StartTime(Alarm)> StartTime(Shift) and EndTime(Alarm) < EndTime(Shift)?
Please clarify.
Thanks!
- guilherme93silv5 years agoRegular Visitor
Hi Anonymous
It's the second option: StartTime(Alarm)> StartTime(Shift) and EndTime(Alarm) < EndTime(Shift)
- v-kkf-msft5 years agoCommunity Support
Hi guilherme93silv ,
Try the following formula:
Shift ID = CALCULATE( MAX(Shift[Shift ID]), FILTER( Shift, Shift[starttime] <= Alarm[starttime] && Shift[endtime] >= Alarm[endtime] ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.