Select to view content in your preferred language

Custom Symbology based on Expression

452
0
07-10-2023 12:47 AM
Labels (1)
PachiraEizzaParamitha
Emerging Contributor

Hi Everyone, 

I am currently working on a project that consist of a feature layer that pulled data from a data stream. The data is actually coming from 4 sensor points, but the data records kept growing so there are thousands of records in the feature layer - resulting in thousands of points in my Map. Currently, I used a custom expression to visualize the data based on the sensor's value:

var moisture = $feature.moisture
var N = $feature.N
var pH = $feature.pH
var date = $feature.Date


When(
    moisture >= 0.85, 'Warning',
    moisture <= 0.2, 'Warning',
    N >= 0.06, 'Warning',
    N <= 0.03, 'Warning',
    pH >= 7.5, 'Warning',
    pH <= 6, 'Warning',
    'Normal Condition'
)

 

Is there any way to filter the data so that the map only visualizes the latest condition of each sensor? I have tried to use filter capabilities, but it is limited to filter the data only within the last 1 minute. Meanwhile, the data comes in seconds. I need to sort by the latest data added and filter only the four latest records.

 

Thank you for your help.

 

0 Kudos
0 Replies