Forum Discussion

sellersmd's avatar
sellersmd
Frequent Visitor
3 years ago
Solved

How to match activity times against a schedule in Power Query

Hello,   I have two tables I am working with.   One is a daily 'schedule' of times when certain activities should occur and includes the activity name, start time, and end time. In this table, ac...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi sellersmd ,

     

    I think the first table is the schedule table, and the second table is the table of the actual start time, right?

    Here's my solultion. It's recommended to complete it in Power Query.

    1.You can merge the Actual table with the Schedule table. Reference: Merge Queries

     

    2.Expand the tables in the Schedule column.

    3.Create a custom column to get the On Time, Early and Late. Refernce: Add a custom column - Power Query | Microsoft Learn

     

    4.Remove the rows contains null.

    Click OK.

    5.Remove the unneeded columns and add a custom column with 1.

    6.Pivot the Custom column to get the countings.

    Pivot columns (Power Query) - Microsoft Support

     

     

     

    Best Regards,

    Stephen Tao

     

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