Filter only most recent value in each day from a query
Our take
I have a query that pulls exchange rates. Unfortunately the data available contains all of the daily currency exchange rate reports (4 or 5 per day) but I only need the latest one for each day. Snapshot below shows column with Date and Time (dd/mm/yyyy HH:MM:SS) and the exchange rate. For example, for 02/01/2020 I only want to keep the latest value, from time 13:11:11.
Notice that this is in PowerQuery, and I would rather resolve it here, since I pull this query into different spreadsheets. Maybe a Pivot Table and filter could do it in a table, but then I can't make a query into that PivotTable.
My current workaround is to download a CSV from another source, but I have to manually download it and manually replace colons, commas etc. to match the desired format.
STOCKHISTORY won't do it, because (a) it's not the official rate, and (b) because the query and the CSV download are alway automatically updated to the latest date.
Thanks for any suggestions.
[link] [comments]
Read on the original site
Open the publisher's page for the full experience