Or at least know the formula that the author, Scott Adams, uses to ensure his comic is funny? He calls his formula the 2-of-6 rule. He gives a list of 6 elements that, in order for something to be funny, it needs to cover two of them. This kind of sounds like a commercial I've seen but can't remember the product.
I won't give the list here since it is his work. If you do click-thru you'll see that he compares two other comics where one cuts the mustard and one does not. Funny stuff!