Is “Last” aggregation type = Last Received Data Point

For gauges, I was wondering if there is any difference between the “Last Received Data Point” option compared to using a specific duration with the “LAST” aggregation type?

It seems redundant if they are so I’m thinking there must be a subtle difference?

You’re right; in the case of the Data: Gauge Query Node and the Gauge Block, there really isn’t any difference between the “LAST” aggregation and “Last received data point”. Both will take the last data point received for your given device query, regardless of the duration applied.

As part of our next release, we’re actually exposing “FIRST” and “LAST” aggregation in many more places throughout the platform, so you’ll see those aggregation selectors and their options getting more consistent.


I found a bit of a difference with testing.

When using “last data point” the gauge seems to show the last known value and increments the “minutes ago” Indicator indefinitely - even after hours. If you set it to a duration of 5 minutes and use LAST aggregation, it will show the last known value for 5 minutes and then show “n/a” thereafter.

That doesn’t seem to be documented anywhere, or is it?

You’re right, and I should have made that clear in my original explanation. I was assuming that you had device(s) reporting data at a regular interval.

If you set a duration of 5 minutes, and no devices within your query reported a state value for the chosen attribute within that time, you will not be returned a value regardless of the selected aggregation method. However, if you set the duration to “Last received data point”, the query will go back in time until it retrieves a value for the attribute and the devices given.

On this subject, note that we only hold on to your application data for a set period of time - otherwise known as a “TTL”. You can view your organization’s TTL in the usage table on your organization’s overview page or within your org’s “Current Usage” page. If the application is owned by a Sandbox, you’ll find that information under the “Sandbox” link in the “Organizations” tab.

So, if you make a gauge query with “Last received data point”, and the last point was reported 45 days ago but the application’s TTL is only 30 days, the query will not return a value as the data is no long stored within Losant.


That’s clear now! I’d suggest adding that to the documentation.

I’ve noticed that the gauge populated with “n/a” text. Is that a real state and is it accessible elsewhere in the platform? For example, could I force a gauge into a n/a state through a certain value placed into the attribute?