We’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
Choose Language Hide Translation Bar
Highlighted
CAPEGA
Level I

How can I use a dynamic column name?

How can I use a dynamic column name like this

 

 

 dt_tansposed = dt << Split(
Split By( :description ),
Split( Column Name(Value)), //??? Split(:VALUE) or Split(:AVG) works
Group( :Time ),
Remaining Columns( Drop All ),
Sort by Column Property
);

Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How can I use a dynamic column name?

Hi,

 

Try using Column(Value), instead of Column Name (Value).  See below:

dt=Open("$SAMPLE_DATA/Big Class.jmp");

Splitcolname="height";
dt << Split(
	Split By( :age ),
	Split( Column(Splitcolname) ),
	Group( :sex ),
	Remaining Columns( Drop All ),
	Sort by Column Property
)

View solution in original post

1 REPLY 1
Highlighted

Re: How can I use a dynamic column name?

Hi,

 

Try using Column(Value), instead of Column Name (Value).  See below:

dt=Open("$SAMPLE_DATA/Big Class.jmp");

Splitcolname="height";
dt << Split(
	Split By( :age ),
	Split( Column(Splitcolname) ),
	Group( :sex ),
	Remaining Columns( Drop All ),
	Sort by Column Property
)

View solution in original post