Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Does any of you please help me writing this code in a Script Level, I know I can do it with Group by but I dont see it clear how to. Any suggestions?
Code:
=SUM(IF(Aggr(Count(DISTINCT [Positions] ) ,[Ee_ID])>1,1,0))
Thank you for your time,
Pablo
To complete the whole expression, I think then there is another step where he seem to be summing the 1's
Temp1:
Load Ee_ID,
If(Count(Distinct (Positions)) > 1, 1, 0) as Aggregate_Position_Field
Resident YourTableName
Group By Ee_ID;
Temp2:
LOAD Sum(Aggregate_Position_Field) as ExpressionResult
Resident Temp1;
Dear Pablo,
Here is a code,
---------------------
Script
--
Load Ee_ID,
If(Count(Distinct (Positions)) > 1, 1, 0) as Aggregate_Position_Field
Resident YourTableName
Group By Ee_ID;
Expression
--
Sum(Aggregate_Position_Field)
Kind regards,
Ishfaque Ahmed
try this one
If(Count(Distinct (Positions)) > 1, 1, 0) as Aggregate_Position_Field
To complete the whole expression, I think then there is another step where he seem to be summing the 1's
Temp1:
Load Ee_ID,
If(Count(Distinct (Positions)) > 1, 1, 0) as Aggregate_Position_Field
Resident YourTableName
Group By Ee_ID;
Temp2:
LOAD Sum(Aggregate_Position_Field) as ExpressionResult
Resident Temp1;