I'm trying to create a special arcade function in a Dashboard List (Enterprise 10.9.1) that finds the unique between two fields and then counts the number of one field. The below screenshot is a example of data. I have entries with multiple subnetworks. Within the subnetworks there is accounts, the accounts can be duplicated across the same subnetwork and across other subnetworks. I want to find only where the subnetwork + account are unique (this way the accounts that run across multiple subnetworks can be counted in each). Then once I find the unique I want a count of each account within each Subnetwork. Below is utilizing the GroupBy function that I get the first GroupBy to work, but the second GroupBy returns a blank table. I also tried the Distinct function and I get similar results and the Distinct tends to crash the entire Dashboard.
var portal = Portal(portal url);
var secondary = FeatureSetByPortalItem(portal,'1bb7df369ca44c8880d65011fa3d69e6',40,['*'],false)
var service = Filter(secondary, 'lifecyclestatus = 8');
var sub = GroupBy(service,
[
{name: 'Subnet', expression: 'SUBNETWORKNAME'},
{name: 'acct', expression: 'account'}
],
[
{ name: 'SubAccountCount', expression: '1', statistic: 'COUNT' },
]
);
var gsub = GroupBy(sub,
['Subnet'],
[
{ name: 'Subnetwork Count', expression: '1', statistic: 'COUNT' },
]
);
return gsub
