Hello!
I am not sure this is even possible, but...
I am using a client's dataset which I can't edit, otherwise I would just create a new field in the actual data. I need to multiply one field by the percentage of another and display a table that shows GroupedBy status elements. Below is the code that I have so far...please let me know if there are any ideas.
var fs = FeatureSetByPortalItem(
Portal('https://xyz'),
'05b99d65195e41x5b1f49436eea53bfb',
0,
['PermitCurrentStatus', 'TotalLand', 'UndividedInterest'],
false
);
var field1 = 'TotalLand',
var field2 = 'UndividedInterest',
var trueacreage = field2/100 * field1
return GroupBy(fs, ['PermitCurrentStatus', 'UndividedInterest','TotalLand'],
[{name: 'TotalLand_count', expression: 'TotalLand', statistic: 'SUM'},
{name: 'trueacres', expression: 'trueacreage', statistic: 'SUM'},
{name: 'UndividedInterestCount', expression: 'UndividedInterest', statistic: 'SUM'}]);