Can you not alter the SQL export to provide distinct data? If not, you will need an additional formula column in the source data for the pivot.