have it both ways

Achieve two mutually exclusive objectives, as in Bill wants to have it both ways—to enjoy Christmas at home and to travel with his friends. The related have it all means “to get everything one wants,” as in It's too bad we can't have it all—the wisdom of experience and the fresh enthusiasm of youth. [Early 1900s]

The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.