A user has sent me examples of reports, produced by Power Automate, which she says are incorrect. I have checked the flow and after doing my own tests, it seems that the Get Items action which selects the data for the report, is not working correctly.
I have rerun the same flow several times in quick succession and the Get Items action is returning a different number of records and the dataset returned contains duplicate values. For example:
| Run time | Records returned | Number of duplicates |
| 12.52 | 2035 | 39 |
| 14.29 | 2024 | 28 |
| 14.35 | 2055 | 48 |
| 15.01 | 2052 | 48 |
I have also noted that records values are missing from each set returned. It seems possible that the duplicate records have replaced the missing ones.
The action is reading a SharePoint table containing about 48,000 records and is using an indexed column to select the records and sort them by this field. The action's Filter Query parameter is:
Session_x0020_time ge '2023-11-01T00:00:00.000Z' and Session_x0020_time le '2023-12-01T00:00:00.000Z'
and the action's Order By value parameter is:
Session_x0020_time
I retested the flow, removing the Order By parameter and the results were now consistent and (as far as I can tell) correct:
| Run time | Records returned | Number of duplicates |
| 15.55 | 2052 | 0 |
| 16.04 | 2052 | 0 |
Is there some sort limit that this query is hitting that is preventing it returning the correct data?