Forum Discussion
guilherme93silv
5 years agoRegular Visitor
match values between 2 dates
Hi all, i'm new to power bi and i'm facing this problem: I have 2 tables, one is called "alarm table" and have information about all alarms (start time of the alarm, end time of the alarm and alarm ...
- 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.
ryan_mayu
5 years agoSuper User
maybe you can try this
Column =
VAR _start=maxx(FILTER(Shift,'Shift'[Starttime]<=Alarm[Starttime]),Shift[Shift])
VAR _end=minx(FILTER(Shift,Shift[Endtime]>=Alarm[endtime]),Shift[Shift])
return if(_start=_end,_start)