The common reason behind the Data source reference is not valid error in Excel is the fact that the filename of the Excel workbook contains square brackets which are invalid characters. Another primary reason for the same error is that the range from which you are trying to insert a pivot table doesn’t exist or is undefined. Or, the reference for the named range you are using for your pivot table is invalid.