Forum Discussion
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 to appear for each region.
Write now when I add the Temperature column on the "tooltips", it shows me the sum of the temperature:
What I want it to show is the temperature of the latest date and time on my table, for each region.
I know I can find the latest date and time by using Max function, but I don't know how to show the temperature of the rows that qualify.
Thank you.
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.
6 Replies
- Mariusz
Community Champion
- AnonymousNot 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
Community 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.