Creating a Crosstab
		
		
		
		Jump to navigation
		Jump to search
		
// Working on Phone.sav, this creates a new crosstab of Age by Gender.
var t = project.report.appendTable();
t.primary = project.dataFiles[0].getQuestionByName('Age');
t.secondary = project.dataFiles[0].getQuestionByName('Gender');See also
- QScript for an explanation of how to run this code.
 - Tables - Lots of Crosstabs for a QScript to generate a batch of crosstabs.
 - QScript Examples Library for other examples.
 - QScript Reference for technical information.
 - JavaScript for information about the JavaScript programming language.
 - Table JavaScript and Plot JavaScript for tools for using JavaScript to modify the appearance of tables and charts.
 - JavaScript Variables for detail on how to create new variables in the Variables and Questions tab using JavaScript.