281981 | "ANPZ34P3" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 54 | 12 |
281982 | "AYF7FWBQ" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 85 | 12 |
281983 | "AGFL7RGG" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 17 | 12 |
281984 | "ACCGJ2KB" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 31 | 12 |
281985 | "APPWHRLG" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 38 | 12 |
281986 | "AHLN14H6" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 61 | 12 |
281987 | "AWL3RVGH" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 43 | 12 |
281988 | "AYW1PRKD" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 19 | 12 |
281989 | "A4RRSN0B" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 30 | 12 |
281990 | "A9BHX0FH" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 22 | 12 |
281991 | "AQQ4M3SG" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 37 | 12 |
281992 | "A3T32W43" | Dec 15, 2023, 12:00:00 PM Pacific Standard Time | 47 | 12 |
Solved! Go to Solution.
Here's how to filter out the records to only show the last twelve readings from a particular sensor.
var p = Portal("https://arcgis.com");
var table = FeatureSetByPortalItem(
p, "0749f4597e054caf809b5b55d0b869d4",
0,
['sensor_id','time_stamp','pm25calibrated','avg_'],
false
)
var sensor = $feature.sensor_id;
var table_twelve = Filter(table, "avg_ = '12' AND sensor_id = @sensor")
return Top(OrderBy(table_twelve,"time_stamp desc"),12)
Here's how to filter out the records to only show the last twelve readings from a particular sensor.
var p = Portal("https://arcgis.com");
var table = FeatureSetByPortalItem(
p, "0749f4597e054caf809b5b55d0b869d4",
0,
['sensor_id','time_stamp','pm25calibrated','avg_'],
false
)
var sensor = $feature.sensor_id;
var table_twelve = Filter(table, "avg_ = '12' AND sensor_id = @sensor")
return Top(OrderBy(table_twelve,"time_stamp desc"),12)
That solution works, thanks again, Ken!