function select(cases)
	DataSelect();
	if ~def(cases) | isnum(cases)
		return
	end
	filt = calcFilter(cases);
	i = GetVarPos("FILTER$");
	if (i==0)
		DataAddVar("FILTER$");
	end
	Data(:,"FILTER$")=filt;
	DataSelect("FILTER$");
end