Filter not filter text columns

161
0
06-01-2021 07:03 AM
BrunoGomesdeSouza
New Contributor II

Guys,

I'm facing a problem with dashboard filters.

I've built an Arcade expression that returns me two columns of two different layers.
Some of them has equal names, I was thinking that filtering one column with other it will return just the match between them, but not, Dashboard returns me none.

Do you have some advice?

the code:

var fs = GroupBy(
FeatureSetByPortalItem(Portal('My portal'), 'my feature', 0, ["*"], false),
["Alvo"],
[
{name:"Contagem", expression: 'Alvo', statistic: "COUNT"}
]
);
var fs_geof = GroupBy(FeatureSetByPortalItem(Portal('my portal',"my feature, 14, ["*"], false),
["Target_Geof"],
[
{name:"Alvo", expression: 'Target_Geof', statistic: "COUNT"},
]
);
var combinedDict = {
fields: [
{ name: "Alvo_ET", type: "esriFieldTypeString" },
{ name: "Alvo_Geof", type: "esriFieldTypeString" },
{ name: "count_total", type: "esriFieldTypeInteger" },
],
geometryType: "",
features: [],
};
// Loop through each of the three FeatureSets and store attributes into a combined dictionary.
var i = 0;
for (var m in fs) {
combinedDict.features[i] = {
attributes: {
Alvo_ET: m['Alvo'],
count_total: SUM(m['Contagem']),
},
};
i++;
}

for (var p in fs_geof) {
combinedDict.features[i] = {
attributes: {
Alvo_Geof: p['Target_Geof'],
count_total: SUM(p["Alvo"]),
},
};
i++;
}

var geral = FeatureSet(Text(combinedDict));

var filtro = Filter(geral, 'Alvo_ET');
var filtro2 = Filter(geral, 'Alvo_Geof = filtro');

return filtro2

 

the result of my filter:

BrunoGomesdeSouza_0-1622556195569.png

 



0 Kudos
0 Replies