Select to view content in your preferred language

Data expression coding help

454
1
06-03-2024 03:32 AM
JB_SEPA
Occasional Contributor

Can anyone please save me from going insane with this nagging issue?

I'm trying to create a featureset of farms that are purely "Good practice" (Status =3 or Good=1). Here's my featureset of farm issues where farmcode (farm identifier) is not unique.

JonathanBowes_0-1717410338808.png

I'm trying to select farms that ONLY have Status=3 or Good =1 for each FarmCode grouping. Sometimes a  FarmCode will be unique, sometimes multiples depending how many issues there are on a farm.

Cheers for any pointers,

Jonathan

 

0 Kudos
1 Reply
JB_SEPA
Occasional Contributor

Is solved this pretty quickly after posting. I applied a GroupBy as follows:

Var Tester2 = GroupBy(Tester, ['FarmCode'], 
[{name: 'Good', expression: 'Good', statistic: 'SUM'},
{name: 'Bad', expression: 'Bad', statistic: 'SUM'},
]);

 Seems to work great.....just checking results now.

0 Kudos