Forum Discussion
Anonymous
7 years agoNot applicable
How to add latest data on map tooltip?
I'm using ArcGIS maps. I have 3 columns, region_name, temperature and date_time. I want on the map, at the tooltip that appears when you hover your mouse over the bubble, for the latest temperature ...
- 7 years ago
Hi Anonymous
Give this a go instead
Max Temp = VAR _last = { CALCULATE( MAX( 'Table'[date_time] ), ALL( 'Table'[date_time]) ) } RETURN CALCULATE( MAX( 'Table'[temperature] ), TREATAS( _last, 'Table'[date_time] ) )Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
Anonymous
7 years agoNot applicable
I get the following error:
It's true that I have several date_times that are the same, because I have several regions. Each region has its own date_time. How could I fix this?
Thank you.
Mariusz
7 years agoCommunity Champion
Hi Anonymous
Give this a go instead
Max Temp =
VAR _last = { CALCULATE(
MAX( 'Table'[date_time] ),
ALL( 'Table'[date_time])
) }
RETURN CALCULATE(
MAX( 'Table'[temperature] ),
TREATAS( _last, 'Table'[date_time] )
)
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.

Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
- Anonymous7 years agoNot applicable
Mariusz Thank you so much, I appreciate it.
Would you mind explaining why your 2nd solution fixes the issue I had on your 1st one?
- v-frfei-msft7 years agoCommunity Support
Hi Anonymous ,
Refering to the document abouth LASTDATE. When the current context is a single date, the date returned by the FIRSTDATE and LASTDATE functions will be equal. That's why you got the error message.
- Mariusz7 years agoCommunity Champion