I'm seeking assistance with an arcade expression to show some data in a dashboard: Percent from two values in one field of a table to display in an indicator (matched / total).
If I could figure out how to do this without an expression I would be happy, but I don't think the indicator element is capable of calculating a percent.
var fs = FeatureSetByPortalItem(Portal('https://gisportal.company.com/portal'),
'itemId',
0,
[
'matched', //field name
],
false
);
// Count of 'matched' by counting number of rows that are 'matched' and this one is giving me the execution error so can't even get to the next variable
var matched = Count(fs["matched"] == 'matched', 1, null);
// Total count of 'matched' and 'asset only', (this could be totally wrong)
var total = Count((When(fs["matched"] == 'matched', 1, null)) + (When(fs["matched"] == 'asset only', 1, null)));
var percentMatched = (matched / total) * 100;
return FeatureSet(percentMatched);
If it matters/helps, the 'matched' field has three values: matched, asset only, gis only.
Thanks