Forum Discussion

guilherme93silv's avatar
guilherme93silv
Regular Visitor
5 years ago
Solved

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 ...
  • v-kkf-msft's avatar
    v-kkf-msft
    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,
    Winniz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.