If the data range is empty, fill it with the necessary data or select a valid data range before creating the pivot table.