Hello!
I am creating a dashboard in Portal that shows the total length of our four important pipe feature classes. I created an indicator for each of these layers showing the calculated sum of the Shape__Length field.
I now need a way to create a new indicator showing the simple sum of the four existing ones. How can I do this?
I did some research and started creating a data expression that looked back to the feature sets rather than the indicators. See below. However, this creates a number as an output and I need it to create a FeatureSet that an indicator can use. Please help!
var portal = Portal('portalnamehere')
//pressurized mains
var pm = Filter(
FeatureSetByPortalItem(
portal,
'item id here',
11,
['Owner_Entity','LifeCycleStatus','Shape__Length'],
false
),
"(Owner_Entity = 'Oklahoma City') AND (LIFECYCLESTATUS = 'ACTIVE')"
);
var sumPM = sum(pm,"Shape__Length")
//service lines
var sl = Filter(
FeatureSetByPortalItem(
portal,
'item id here',
9,
['Owner_Entity','LifeCycleStatus','Shape__Length'],
false
),
"(Owner_Entity = 'Oklahoma City') AND (LIFECYCLESTATUS = 'ACTIVE')"
);
var sumSL = sum(sl,"Shape__Length")
//gravity mains
var gm = Filter(
FeatureSetByPortalItem(
portal,
'item id here',
10,
['Owner_Entity','LifeCycleStatus','Shape__Length'],
false
),
"(Owner_Entity = 'Oklahoma City') AND (LIFECYCLESTATUS = 'ACTIVE')"
);
var sumgm = sum(gm,"Shape__Length")
//atoka
var at = FeatureSetByPortalItem(
portal,
'item id here',
4,
['Owner_Entity','LifeCycleStatus','Shape__Length'],
false
)
var sumat = sum(at,"Shape__Length")
var totalsum = sumpm + sumSL + sumgm + sumat
return totalsum/5280