Forum Discussion
Complicated Phone System Log Question
- 1 year ago
Hi Thomas_MedOne ,
Thanks for posting in Microsoft Fabric Community and for the detailed explanation.
Flattening this type of event log structure into a single row per call is achievable in Power Query by following a systematic approach:
- Group the data by the Call-ID-Ord to bring all related rows under each unique call. This ensures all event types (like "Incoming," "Forward," "Ring to Member") are kept together.
-
Use custom columns with conditional logic (for example, using Table.SelectRows or Table.AddColumn with if conditions) to extract values from specific event rows:
Start Time and DurationCalc from the "Incoming" row.
WaitTimeCalc from the "Forward" row.
Start Time and DurationTime from the "Ring to Member" row (the final one where the call is answered). -
For the gap between calls logic, you can use sorting by Start Time and indexing the rows, then calculating the difference between the end of one call and the ring time (or start time) of the next call. This may involve additional logic to check if the calls overlap (based on call durations) or are independent.
-
You may also consider creating conditional flags (for example, "Call Overlaps" or "Available but not ringing") to track if the agent was available but did not receive a call during that gap period.
Here are some similar resources:
Flattening parent-child hierarchy in Power Query
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.
Thank you.
Hi Thomas_MedOne For this, you can group the data by Call-ID-Ord to handle each call as a single entity. Then, filter rows within each group to extract Start Time from "Incoming", Wait Time from "Forward", Answered Time from "Ring to Member", and Total Talk Time from the "Ring to Member" row. Flatten the grouped data so each call is represented in a single row with all the required metrics. Finally, calculate the gap between calls if needed for further analysis.