google visualization – Creating a table chart and category filter

I am very new to javascript, google app script and google visualization so apologies if my questions are a bit elementary.

My use case:
I am building a web app for yoga company where members are suppose to keep track of their training progress for 21 days. I am using google forms to capture their training progress. For each of the 21 days, there is a google form and responses from the forms are captured into a google spreadsheet. Once the member completes each day, he/she can click on the “My Progress” button to see their progress till date.

The next piece of the web app is that when the yoga instructor logs into the web app, he or she should see all of their members for that given center. Then using the category filter, I want to be able to allow the yoga instructor to select which members are 1 day behind schedule, 2 days behind schedule or greater than 2 days behind schedule.

My issue is that once a member gets caught back up, then he or she should not appear on the late list. I am not sure how to do this.

I have add my code for reference. Any help would be so appreciated.

Complete code in the JSFiddle Link

function setChartView ()

{// Begin of function setChartView ()

 var state = columnFilter.getState().selectedValues;
 var row;
 var view  = {
        columns: [0]
    };

var viewFilters = [];


console.log ("Display state.length:  " + state.length)
console.log ("Display value for state:  " + columnFilter.getState().selectedValues)

tableChart.setDataTable(memberView)

  if ((state.length > 0) && (columnFilter.getState().selectedValues == "Greater Than 2 Days Behind Schedule" ))
     {// Begin of IF Statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "Greater Than 2 Days Behind Schedule" ))

        //console.log ("Display inside the IF statement for (state.length > 0) && (columnFilter.getState().selectedValues == Current Day Not Complete ")
        var daysBehindSchedule = 0

  
        tableChart.setView({rows: centerData.getFilteredRows([{column: 11,
                                                              test: function daysBehindSch (value)
                                                                     {//Begin of function daysBehindSch (value)
                                                                        var actualDayTime = new Date (value)
                                                                        var actualDayTimeStr = actualDayTime.toDateString()
                                                                        console.log ("Display actualDayTime:   " + actualDayTime)
                                                                        var currentDate = new Date()
                                                                        var currentDateStr = currentDate.toDateString()
                                                                        var currentDayFlag = "No"
                                                                        
                                                              
                                                                        console.log ("Display currentDate:   " + currentDate)
                                                                        if (actualDayTimeStr == currentDateStr)
                                                                           {
                                                                             currentDayFlag = "Yes"
                                                                           }

                                                                        if (actualDayTime < currentDate)
                                                                           {
                                                                             daysBehindSchedule = currentDate.getDate() - actualDayTime.getDate() 
                                                                             console.log ("Display daysBehindSchedule:  " + daysBehindSchedule)
                                                                             if (daysBehindSchedule > 2)
                                                                                {
                                                                                  return true
                                                                                }
                                                                             else
                                                                               {
                                                                                 //document.getElementById("errorMsg01").innerHTML = "No members are greater than 2 days behind schedule";
                                                                                 return false
                                                                               }
                                                                           }
                                                                  
                                                                     } //End of function daysBehindSch (value)
                                                                },
                                                                {column: 1,value: '1 - Day'},
                                                                {column: 12,
                                                                 test: function daysCompleted (value)
                                                                       {// Begin of function daysCompleted (value)

                                                                          if (value <= 21)
                                                                            {
                                                                              return true
                                                                            }
                                                                          else
                                                                            {
                                                                              return false 
                                                                            }

                                                                       }// End of function daysCompleted (value)
                                                                }

                                                                ])})

     }// End of IF Statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "Greater Than 2 Days Behind Schedule" )) 
  else if ((state.length > 0) && (columnFilter.getState().selectedValues == "2 Days Behind Schedule" ))
     {// Begin of ELSE IF statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "2 Days Behind Schedule" ))
       tableChart.setView({rows: centerData.getFilteredRows([{column: 11,
                                                               test: function daysBehindSch (value)
                                                                     {//Begin of function daysBehindSch (value)
                                                                        var actualDayTime = new Date (value)
                                                                        console.log ("Display actualDay:   " + actualDayTime)
                                                                        var currentDate = new Date()
                                                                        if (actualDayTime < currentDate)
                                                                           {
                                                                             daysBehindSchedule = currentDate.getDate() - actualDayTime.getDate() 
                                                                             console.log ("Display daysBehindSchedule:  " + daysBehindSchedule)
                                                                             if (daysBehindSchedule == 2)
                                                                                {
                                                                                  return true
                                                                                }
                                                                             else
                                                                               {
                                                                                 //document.getElementById("errorMsg02").innerHTML = "No members are 2 days behind schedule";
                                                                                 return false
                                                                               }
                                                                              
                                                                           }
                                                                        
                                                                        
                                                                     } //End of function daysBehindSch (value)
                                                                },
                                                                {column: 1,value: '1 - Day'},
                                                                {column: 12,
                                                                 test: function daysCompleted (value)
                                                                       {// Begin of function daysCompleted (value)

                                                                          if (value <= 21)
                                                                            {
                                                                              return true
                                                                            }
                                                                          else
                                                                            {
                                                                              return false 
                                                                            }

                                                                       }// End of function daysCompleted (value)
                                                                }

                                                                ])})
     } // End of ELSE IF statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "2 Days Behind Schedule" ))
  else if ((state.length > 0) && (columnFilter.getState().selectedValues == "Current Day Not Complete" ))

     {// Begin of ELSE IF Statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "Current Day Not Complete" ))
                 tableChart.setView({rows: centerData.getFilteredRows([{column: 11,
                                                               test: function daysBehindSch (value)
                                                                     {//Begin of function daysBehindSch (value)
                                                                        var actualDayTime = new Date (value)
                                                                        console.log ("Display actualDay:   " + actualDayTime)
                                                                        var currentDate = new Date()
                                                                        if (actualDayTime < currentDate)
                                                                           {
                                                                             daysBehindSchedule = currentDate.getDate() - actualDayTime.getDate() 
                                                                             console.log ("Display daysBehindSchedule:  " + daysBehindSchedule)
                                                                             if (daysBehindSchedule == 1)
                                                                                {
                                                                                  return true
                                                                                }
                                                                             else
                                                                               {
                                                                                 //document.getElementById("errorMsg03").innerHTML = "Members have completed current day";
                                                                                 return false
                                                                               }
                                                                              
                                                                           }
                                                                        
                                                                     } //End of function daysBehindSch (value)
                                                                },
                                                                {column: 1,value: '1 - Day'},
                                                                {column: 12,
                                                                 test: function daysCompleted (value)
                                                                       {// Begin of function daysCompleted (value)

                                                                          if (value <= 21)
                                                                            {
                                                                              return true
                                                                            }
                                                                          else
                                                                            {
                                                                              return false 
                                                                            }

                                                                       }// End of function daysCompleted (value)
                                                                }

                                                                ])})

     }// End of ELSE IF Statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "Current Day Not Complete" ))

  else 
     { // Begin of ELSE Statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "Greater Than 2 Days Behind Schedule" ))

         tableChart.setView({rows: centerData.getFilteredRows([{column: 1,value: '1 - Day'}])}, {columns: memberView.setColumns([0,8,9])})

     } // END of ELSE Statement for ((state.length > 0) && (columnFilter.getState().selectedValues == "Greater Than 2 Days Behind Schedule" ))
    
    tableChart.draw();

}// End of function setChartView ()

google.visualization.events.addListener(columnFilter, ‘statechange’, setChartView);

setChartView();
columnFilter.draw();

}// End of drawCenterDashboard ()

} // End of function createCenterDashboard (output1)