Hi everyone!
I hope anyone reading this is having a great day.
I'm someone that is very new at creating dashboards and using ArcGIS online, so this is one question of many on my journey to learn as mucha as I can.
As mentioned on the tite I'm trying to create an Arcade Data Expression but is not working properly. In the set of data that I'm using there're 3 elements that I'm trying to integrate or make an operation with, these elements are:
I'm trying with arcade to create a data expression that allows me to know the total of advance of each dependency according to the amount of advance done adding all of the actions like:
I'm doing it with this arcade code, but it hasn't worked even after multiple workarounds, any ideas what could be happening?
The first rule of data expressions is they have to return a FeatureSet. Your expression is only returning a number, so the easiest way to make that into a FeatureSet would be using this syntax for the return
return FeatureSet(
{
fields: [{ name: "Total", type: "esriFieldTypeSingle" }],
features: [{ attributes: { Total: Round(total_promedio, 2) } }]
}
);