When you have a RAW DATA table for a text variable set with blank responses, the blank responses are by default shown in the table. The easiest way to remove the blank responses is to simply use the Hide Empty Rows and Columns rule. If you want to add in this functionality to a custom rule, the code below gives a simpler example. Note that this will not affect the sample size shown in the footer. To change this, you will need to create a filter to filter in responses that do not equal blank.
Method
var num_rows = table.numberRows;
var raw_data = table.get('Text');
for (var j = num_rows - 1; j > -1; j--) {
if (raw_data[j][0] == "")
table.deleteRow(j);
}This script works by looping in reverse from the bottom up to delete each blank row.