I set up a collection, similar to your data to show the solution I think will work for you.
Here's the collection:
Collect(colExample, Table({ tag_name_human: "Counter", tag_value_human: 1234},
{ tag_name_human: "Speed", tag_value_human: 5687},
{ tag_name_human: "Counter", tag_value_human: 6733},
{ tag_name_human: "Speed", tag_value_human: 8888},
{ tag_name_human: "Counter", tag_value_human: 9853},
{ tag_name_human: "Counter", tag_value_human: 7333}))
To get the First value:
First(Filter(colExample,tag_name_human="Counter")).tag_value_human
Note: Returns 1234
To get the Last value:
Last(Filter(colExample,tag_name_human="Counter")).tag_value_human
Note: Returns: 7333
Let me know if this helps?