'How to display the most Recent/Latest Value in Power Bi

My table looks something like this:

Location TimeSlot Mean Rate Max Rate Min Rate
New york 2021-12-26 12:45:00 20.20 18.00 13.00
New york 2021-12-26 12:30:00 34.20 23.00 34.45
New york 2021-12-26 12:15:00 38.20 38.00 13.10
New york 2021-12-26 12:00:00 20.20 18.20 13.00
Chicago 2021-12-26 12:45:00 4.20 40.00 13.00
Chicago 2021-12-26 12:30:00 30.20 45.00 4.00

I want to create a table in powerbi that shows the most recent(latest) data point for a given location. For example in this case, the max rate in newyork would display 18.00.

Ive tried many solutions like the link below but they seem to display the maxx value which would be 38.00 for newyork, 45.00 for chicago etc, so now Im stuck!

Any help would be very much appreciated, thank you.

https://blog.enterprisedna.co/using-the-maxx-dax-function-in-power-bi-to-calculate-recent-values-in-your-data/



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source