Former President Barack Obama spoke Wednesday about raising his daughters, at an event in San Francisco organized by data analysis company Splunk.

Obama says that his daughters Malia and Sasha have different temperaments, so he had to take different strategies in raising them.

Likewise, in any company or organization, Obama says that leaders can take different approaches in dealing with different personalities, as well as give people room to make mistakes and learn from them.

Visit Business Insider's homepage for more stories.

Former president Barack Obama said there's a leadership lesson he learned from raising his daughters.

Both of Obama's daughters, Malia and Sasha, are now away at college. Obama spoke about what he learned from parenting at an event on Wednesday in San Francisco organized by the data-analysis company Splunk.

Raising children is similar to nurturing plants, Obama said.

"They're a bamboo or they're an oak or they're a chestnut," Obama said on stage. "They all need water, sunlight, some TLC, but how they grow and what pace, when the branches sprout, when they flower at any given time, it's just different. And so, our daughters were different, and as they got older, they became identifiable."

Obama said that Malia, now 21, has his calm temperament, while Sasha, now 18, is more like his wife, Michelle.

"What that meant was, in parenting, the idea that you do the exact same thing with each child the same way actually doesn't make sense," Obama said. "There has to be equity and fairness in terms of wanting them to get to the same outcomes, but we had to take sort of different strategies with our girls on certain things."

This principle, he says, is "actually a good leadership lesson" that can be applied in the workplace.

"What I found with my staff is, there's some people where I could be more blunt with, and some people, I have to be a little more, what do the girls call it, 'compliment sandwiches,' trying to wrap it around the criticism where you're like, 'You're wonderful. That was a terrible memo. I love you.' There's a little bit of that."

(Management experts might disagree with the former president, here: What he calls the "compliment sandwich" has also been called the "s--t sandwich" or the "c--p sandwich," and is considered by many to be a misguided approach to giving feedback.)

Now that his daughters are away from college, Obama says he has to remember not to call them constantly and to give them their privacy. With his daughters, he says the goal is to coach them to make good decisions, and he had to learn how to balance wanting to help them and letting them make their own mistakes.

Read more: Barack Obama says any president should avoid TV and social media when making a decision — it 'clouds your judgment'

"That's a useful leadership tool that applies to companies as well or any organization," Obama said. "You've got to give folks enough room and ownership to be able to figure stuff out, and by doing that, it means they're going to be making mistakes. That's part of that process of development."