March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
25 | |
18 | |
15 | |
9 | |
8 |
User | Count |
---|---|
37 | |
32 | |
18 | |
16 | |
13 |