You can do this with a single view; you need to get the sorted rows from the view and then translate them back into the table row indices.
var view18 = new google.visualization.DataView(dt);
view18.setRows(
dt.getFilteredRows([{'column': 2, 'value': 'Male'}]));
var sortedViewRows = view18.getSortedRows(3);
var sortedTableRows = [];
for (var i = 0; i < sortedViewRows.length; i++) {
sortedTableRows.push(view18.getTableRowIndex(sortedViewRows[i]));
}
view18.setRows(sortedTableRows);
Using two views makes for cleaner code, though:
var filterView = new google.visualization.DataView(dt);
filterView.setRows(dt.getFilteredRows([{'column': 2, 'value': 'Male'}]));
var view18 = new google.visualization.DataView(filterView);
view18.setRows(filterView.getSortedRows(3));