thanks for your help - I will continue reading on returning feature sets - I thought because I had a expression that worked in a pop up it would work in a dashboard too!
I simplified it but still no results
var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com/'), 'f7cb22d41a1d41c69030ad4d6365ceba' , 0, ['F_CanConne_1','F_Reserved_1','F_Des_Wpro_1','ServiceAre_1'], false)
return GroupBy(fs, ['ServiceAre_1'],
[{name: 'total units', expression: 'F_CanConne_1', statistic: 'SUM' },
{name: 'total units', expression: 'F_Reserved_1', statistic: 'SUM' },
{name: 'Total units', expression: 'F_Des_Wpro_1', statistic: 'SUM' }]);
Execution Error:Feature layer must be created with either a url or a source
thanks again I will keep on reading
Cheers