Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table of gps coordinates and date time.
I want to only display the most recent latitude and longitude on a map, NOT all values like you see below.
I have tried using LASTDATE filter in CALCULATE function but it doesn't support time granularity and throws an error complaining about duplicate days.
How do I get the latitude and longitude based on most recent date time?
You can calculate the latest datetime and then select the latitude and longitude associate with that datetime.
LatestLat =
VAR LastTime = MAX ( Table1[datetime] )
RETURN
CALCULATE ( SELECTEDVALUE ( Table1[latitude] ), Table1[datetime] = LastTime )
Thanks for the reply. I feel like this is really close to what I need. It appears to work for a card tile but map viz doesn't seem to like using a measure for latitude and longitude.
It looks like I can force it by using a SQL query when adding the PBI source... but this feels janky.
Hmm. I guess I'm not very familiar with using maps. It seems weird not to be able to use measures.
In light of this, I'd propose a different method entirely. Use a filter on the datetime column like this
So I tried this, one hitch, it doesn't update when auto-refreshing.
Hi, @goose464
Instead of Lastdate, please try to use MAX
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |