Can all comic book grading fees be deducted all at once or only as comics sold, 23 comics graded, 17 sold?

I had 23 comic books professionally graded for condition.  17 of those sold.  Can I deduct the one time fees for all 23 or only for the 17 that sold?