It is clear from a wide range of polls that the majority of both men and women under 40 are willing to give up power and money to get flexible and interesting work. The problem is that this is not so simple. Taking a low-paying, unimpressive job is not going to give you flexibility. In fact it will probably put you on track to be serving fast-food on a schedule that is so inflexible you have to negotiate with six people to cover your shifts during vacation.

The best way to get flexible, interesting work is to be great at something, and let everyone know your focus, according to research by Ezra Zuckerman, professor of economics at the Massachusetts Institute of Technology. This doesn’t mean being great at climbing the corporate ladder or great at working tons of hours to make partner at a law firm that will dump you. This means getting great at something because, according to Mihaly Csikszentmihalyi, professor of psychology at Claremont University and author of the book Flow, we feel best when we are doing work at a high level of competence.

On top of that, though, employers give flexible deals to people who are in high demand. It’s fortunate that the best way to be in high demand is to do the work you’re great at. Theoretically everyone will be very happy with their flexible, interesting work life.

So, how do you get to that point where you’re great at something?

It’s hard. It’s all about risk, honesty, and, frankly, shattered dreams. Your parents tell you that you can be anything, but you know what? You can’t. If you’re tall you can’t be an Olympic gymnast, and if you’re short you can’t be a runway model. If you’re great with numbers you probably can’t be a talk show host – the skills of a mathematician and a crowd pleaser seldom overlap.

So one of the most important things you can do is come to terms with what you are uniquely suited to do , and what you’re not–and to understand which is which.

Once you admit that some things will suit you better than others, you have to start trying things. Daniel Gilbert, professor of psychology at Harvard, wrote a whole book – Stumbling on Happiness – about how terrible we are at predicting what we’ll like, and nowhere is this more salient a point than in the job world. So start trying things.

Most of what makes people great at something is not raw talent but how hard they work at it, according to research by Steven Levitt, economist at University of Chicago and author of the book Freakonomics. So choose to do something you are excited enough about to work very hard at it, and keep testing things until something grabs you.

Paul Hatziiliades went through this process of self-discovery by starting as an accountant at a kitchen remodeling store. The sales guy left, with no notice, and Hatziiliades found himself greeting customers. And making sales. And liking it.

Then he kept learning about other aspects of the business until he was essentially designing kitchens, which he turned out to have great talent for. He’d have never known this about himself if he had been rigid in what sorts of roles he was willing to take on.

Even when you find that thing, though, at some point you will get stuck. You will see that you are probably great at something, but still not be sure of it. Maybe it’s a startup that you think you can make a go of; maybe it’s a freelance career that is almost sustainable; maybe it’s a big project that could change your career but is very scary.

All these things approach what Seth Godin calls the Dip. In his new book, The Dip, Godin explains that the things that are really worth doing in life – the things that will get you the passion and competence necessary for flow – require getting through a dip. And it’s at the dip where you decide if you can actually get to greatness.

Hatziiliades saw his Dip when the store owners decided to sell. Hatziiliades bought it and turned it into a high-end kitchen design company, called Moda Cucina, that leveraged both his talent for putting together kitchens that customers loved, and his talent for sourcing the right products and materials from all over the world. He had no idea if this business model would work, and he put all his cash into the business. This was the Dip for him. Today, he is on the other side of the Dip, doing what he’s great at, and being recognized for owning that niche he risked everything to get: high-end kitchen design.

Not everyone has Hatziiliades’ experience, though. Sometimes you’ll find you can’t do it – you can’t get past the Dip. Maybe you are trying something that is not the best idea, or you need to shift. Maybe you had an impossible goal. It’s hard in the dip. It’s the time when you doubt yourself, or your ideas, or both. Or you fear failure or you fear success, or both, because both will change you. These are times when you really find out what you can do.

Godin says if you’re on a path worth pursuing, you will walk into the Dip. If there’s no Dip ahead then you are not challenging yourself. You already have accomplished what you will accomplish on that path. And if you never experience the challenge of that Dip then you’ll miss out on the interesting, flexible work, yes, but most of all, you’ll miss out on the great feeling Csikszentmihalyi describes when work is at a high level of competence and engagement.

Sure, sometimes your Dip will come in an area that is not work – for example if you are training for a marathon. Usually, though, the time and energy we spend on our work is so great that it behooves us to look for opportunities that have a dip in them.

With the goals of work changing – from power to personal growth – the process of work will change as well. Work used to be about safety and stability and the Dip was for the risk-loving mid-life-crisis-suffering entrepreneurs. Today a Dip is the necessary path to the dream career where you can control your time and you can be engaged in work at the same time.