Forum Discussion
Merge returning non existent values
- 8 years ago
The cause of your issue is a known phenomenon: if you sort a table and then use Table.GroupBy or Table.Distinct with the sorted table as source, the sort order is not necessarily maintained.
In your case, it means that the nested tables can have a different sort order then the original table.
Apparently you can even have different results in different queries.
The solution is to buffer the sorted table:
#"Sorted Rows" = Table.Buffer(Table.Sort(#"Replaced Values1",{{"HcmWorker_FK_PersonnelNumber", Order.Ascending},{"StartDateLeave", Order.Descending},{"EndDate", Order.Descending}})),
Hi Tcoe12
Is it possible to share the raw data of employees leave latest in excel format and share the link here for finding a solution.
Also can you paste the query using Advanced editor for the employees leaves latest step, to check if there is any thing is missing.
Cheers
CheenuSing
Hi CheenuSing,
Many thanks for your response and offer of assistance.
I have attached the Excel file, and have pasted the Advanced Editor below for the whole of Employees Leave Latest