Hello,
I am having trouble creating a cumulative chart for my dashboard using a modified arcade expression (see below). It doesn't give me an error or anything it just spits out this empty feature set. Any help would be appreciated!
Josh
var portal = Portal("https://www.arcgis.com/");
var vendor = GroupBy(
FeatureSetByPortalItem(portal,"********************",0,["*"],false),
["Invoice_Date"],
[
{ name: "Invoice_Total", expression: "Invoice_Total", statistic: "SUM" }
]
);
var combinedDict = {
fields: [
{ name: "date1", type: "esriFieldTypeDate" },
{ name: "cost1", type: "esriFieldTypeDouble" },
],
geometryType: "",
features: [],
};
var i = 0;
// Loop through each FeatureSet and store its attributes
for (var v in vendor) {
combinedDict.features[i++] = {
attributes: {
date1: "Invoice_Date",
cost1: v["Invoice_Total"],
},
};
}
//return combinedDict;
// Return dictionary cast as a FeatureSet
return FeatureSet(Text(combinedDict));