If a variable is selected in a data table when you run the analysis, then that variable is automatically entered in the Y Variable field of the Variables tab.
If any variable in the data table has a Weight role, it is entered in the Weight Variable field of the Roles tab.