got pivot table working between types and attributes