Find stalled quotes in Excel with Power Query

Open quote-queue-example.xlsx to see the finished result for the two starter exports. The Saved queue, Latest states and Export rows sheets are fixed examples you can compare with your work. To build tables that update when you add a file, set up the three queries below once.

What you need
Use the desktop version of Microsoft 365 Excel for Windows with Data > Get Data and access to a local folder. Extract the entire ZIP before you begin. These practice quotes are fictional. The timestamps use the service team's local time and a 24-hour clock.

1. Prepare the inputs.
Open the exports folder in File Explorer. Keep only week-01.csv and week-02.csv there for the first run. Copy the full folder path from the address bar. Leave week-03.csv and week-04.csv in test-cases for now.

2. Add the shared query.
Open quote-queue-example.xlsx in Excel. Use File > Save As to save a working copy.
Choose Data > Get Data > From Other Sources > Blank Query. In Query Settings, set the name to QuoteSnapshot.
In the Power Query Editor, select Home > Advanced Editor. Open queries/QuoteSnapshot.pq in a text editor such as Notepad. Replace everything in the Advanced Editor with the full contents of the file. In the FolderPath line, put your exports folder between the double quotes. Use standard single backslashes in the Windows path. Select Done.
The preview should show one row for each of Q101, Q102, Q103 and Q104. Set the folder's access permission if Excel asks. Select Home > Close & Load (the arrow) > Close & Load To > Only Create Connection, then OK.

3. Load the two output tables.
Create a blank query the same way. Name it WaitingQueue and paste the entire text of queries/WaitingQueue.pq into Advanced Editor. Select Done. Choose Close & Load To > Table > New worksheet, then OK.
Repeat with the name ConflictReview and the text of queries/ConflictReview.pq. Load this one as a table in a new worksheet too. Keep this output even when it shows only headers. Save the workbook.
If a query already loaded by default, open Data > Queries & Connections, right-click the query, then choose Load To to change the destination.

4. Read the baseline.
The two CSV files have six rows. Q101's duplicate is the same event, leaving five distinct events. Q102 changes from waiting to Scheduled. Q103 is also Scheduled. WaitingQueue shows Q101 and Q104. ConflictReview is empty. A waiting status tells you whom to check. An agreed service target would be needed to call a quote overdue.

5. Add a new export and refresh.
Copy test-cases/week-03.csv into exports. Choose Data > Refresh All and wait for the Excel refresh to finish. WaitingQueue now contains only Q101. Q104's latest update is Scheduled at 08:30 on April 8.

6. Test a conflict.
Keep week-03.csv in exports and copy test-cases/week-04.csv there too. Refresh All. WaitingQueue now has no quote rows. ConflictReview contains Q101 at 10:00 on April 8, with Scheduled / Waiting for approval. The two newest rows are tied at the same instant. Check the source and add a later corrected event before deciding whether to follow up.

To reset, remove just the copies of week-03.csv and week-04.csv from exports and refresh. Q101 and Q104 return to WaitingQueue. Save the workbook when you have the view you want.

What the query does
It reads CSV files named week-*.csv from the selected folder only. Every file needs the headers QuoteID, UpdatedAt and Status. Extra columns are ignored. Rows with a missing field or dates outside yyyy-MM-dd HH:mm:ss trigger an error. It trims outer spaces and keeps quote IDs and status names case-sensitive. It removes identical events across files, finds the newest time per ID, then inspects every status at that time. Identical statuses at the latest time are safe. Two different statuses at that time go to ConflictReview. The waiting queue looks for the exact label Waiting for approval.

If your result differs
Six rows in QuoteSnapshot usually means the editor is showing Combined instead of the last step. Three waiting quotes usually means you filtered for waiting before finding the latest event per ID. If the table stays unchanged, check that you are looking at WaitingQueue, that the refresh completed, and that the new file is inside the exports folder in FolderPath. A message that QuoteSnapshot was not recognized means the shared query needs that exact name. If you rename or move the folder, edit FolderPath in QuoteSnapshot and refresh again.
