//Code to Fit Line, based on status from 3rd column
dt=Current Data Table();
col_name_list = dt << get column names( string );
col= Column(dt,col_name_list[3]);
Bivariate(
Y( col_name_list[1] ),
X( col_name_list[2] ),
Fit Line( {Line Color( {213, 72, 87} )} ),
Where( col == "Zone1" )/*This is where I have an issue. If we give the actual column name as :Name("Zone") it works. I would like to use a variable to I can perform on new data sets*/
);
Bivariate(
Y( col_name_list[1] ),
X( col_name_list[2] ),
Fit Line( {Line Color( {213, 72, 87} )} ),
Where( col == "Zone2" )/*This is where I have an issue. If we give the actual column name as :Name("Zone") it works. I would like to use a variable to I can perform on new data sets*/
);
//Reference Data Below
/*
X Y Zone
0 18 Zone1
0.1 19 Zone1
0.2 20 Zone1
0.3 21 Zone1
0.4 22 Zone1
0.5 23 Zone1
0.6 24 Zone1
0.7 25 Zone1
0.8 26 Zone1
0.9 27 Zone1
1 28 Zone1
1.1 30 Zone2
1.2 29 Zone2
1.3 28 Zone2
1.4 27 Zone2
1.5 26 Zone2
1.6 25 Zone2
1.7 24 Zone2
1.8 23 Zone2
1.9 22 Zone2
2 21 Zone2
*/