Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I need help with an expression example for the following situation.
I have a simple dataset where I have a field, which contains group names - Group1, Group2, etc... I also have a field containing group codes - A, B, C and D.
Each of these groups can have either one of the codes or multiple codes. For example:
Group1 - A
Group2 - A, B, C
Group3 - C, D
I want to create an additional field in my script, which will identify the groups that have multiple codes as 'Multiple' and the groups that have only one code as 'One'.
Can you please help me with a sample expression of how to achieve that?
Best Regards,
Shelly
Hi @ShellyG , you can add that field in the following way:
...
Left Join(GroupNameTable)
Load
GroupName,
If(Count(Distinct GroupCode) > 1, 'Multiple', 'One') AS MultipleField
Resident GroupCodeTable
Group By GroupName;
...
JG
Hi @ShellyG , you can add that field in the following way:
...
Left Join(GroupNameTable)
Load
GroupName,
If(Count(Distinct GroupCode) > 1, 'Multiple', 'One') AS MultipleField
Resident GroupCodeTable
Group By GroupName;
...
JG