Data's Day and Matter of Time might not strictly be referred to as comedies so much as 'light hearted episodes', or episodes with humorous B-plots.
Data's perspective in Data's Day is rather humorous, particularly his musings on O'Brien's wedding. The dancing, his delivery of the 'good news'.
And A Matter of Time, the entire con is humorous. His questioning of the layout of the briefing room, his entire act.
Eh, Data's Day might have more comedic moments than a typical TNG episode, but it still isn't really a comedy, IMO. And I've never viewed anything in A Matter of Time as comedic. At all.