I am attempting to use the following code to count the objectID from multiple feature layers into one chart for my dashboard.
var features = FeatureSetByName($map,'Bike routes', ['*'], true);Count(features);
var features = FeatureSetById($map,'DemoLayerWM_1117', ['*'], true);Count( features );
I have attempted the code in various forms, including combining the layers into a group layer and using the group layer name as the input, attempting to create a feature set from one individual feature layer, and attempting with the multiple feature layers together(desired). I have used all of the following variations, none of which are working for my dashboard. The error highlighted is always one of the following "$map", "$datastore", "FeatureSetByID", or "FeatureSetByName".
Has anyone else encountered the same or similar problems and found any solutions? Thank you.