<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi,
I have a data set where one of the columns is a list of entries such as 1,2 or 7,8,10,12 or blank I would like to create a new column with the number of entities in each row.
I have tried
New column(
"Num_Bumps",
Numeric,
Continuous,
<<set each value(N Items(:Pad #))
)
Where Pad # is the column with entries.
This doesn't work because Pad # is not recognized as a list.
How should it be coded?
You could use the WORDS function with a comma delimiter.
dt = New Table( "Example", Add Rows( 4 ), New Column( "Pad #", Character, Nominal,
Set Values( {"1,2,3", "4,5,6", "", "1,2"} )
),
);
dt << New Column( "Num_Bumps", Numeric, Continuous, Format( "Best", 12 ),
Formula( N Items( Words( :Pad #, "," ) ) ) );