Refactoring of the calculation in table view when more than one questionnaire is selected

FIX #2128