Good afternoon,
I was able to make the sum of two layers that contained a different attribute.
The question here is whether it is possible to bring the date field so that you can make the Date Selector that is in the Dashboard?
Sum of two layer (Via Arcade)
// Usar FeatureSetByPortalItem para acessar a camada através do Portal
var fs1 = FeatureSetByPortalItem(portal, 'c5a5d101f83b4860b7b3bd67ea8811b5', 'Formulario_Agrup', ['n_lobitos']);
var fs2 = FeatureSetByPortalItem(portal, '955838271a704732a4e93de1ed17b239', 'Formulario_RegiaoNucleo', ['n_lobitos']);
// Inicializa a soma
var running_sum = 0;
// Soma os valores do campo 'n_lobitos' de cada camada
var set_sum1 = Sum(fs1, 'n_lobitos');
Console('Sum from Formulario_Agrup (Portal):', set_sum1);
running_sum += set_sum1;
var set_sum2 = Sum(fs2, 'n_lobitos');
Console('Sum from Formulario_RegiaoNucleo (Portal):', set_sum2);
running_sum += set_sum2;
// Retorna o FeatureSet com a soma total
return FeatureSet({
fields: [{name: 'sum_n_lobitos', type: 'esriFieldTypeInteger'}],
geometryType: null, // Não estamos utilizando geometria
features: [{attributes: {sum_n_lobitos: running_sum}}]
});
Does not bring the date field in the sum...

Any solution?