2. The thing is done anyway and the situation improves.
3. Claim credit for the improvement.
4. Do something that makes things worse.
5. Claim you had nothing to do with the thing that made things worse.
In Foreign Affairs:
Then-Senator Obama opposed the Iraq surge, claiming
"I am not persuaded that 20,000 additional troops in Iraq is going to solve the sectarian violence there. In fact, I think it will do the reverse,"
There is some debate about whether the surge worked or not, but certainly the situation improved rather than worsened. The state of affairs in Iraq by 2011 was so good that the President could claim victory.
Back in 2012, Obama took credit for removing all troops from Iraq,
"With regards to Iraq, you and I agreed, I believe, that there should be a status of forces agreement," Romney told Obama as the two convened on the Lynn University campus in Boca Raton, Fla., that October evening. "That’s not true," Obama interjected. “Oh, you didn't want a status of forces agreement?” Romney asked as an argument ensued. “No,” Obama said. “What I would not have done is left 10,000 troops in Iraq that would tie us down. That certainly would not help us in the Middle East.”
Now that Iraq is in chaos, not so much,
On Thursday, Obama addressed reporters in the White House Briefing Room about Iraq’s latest crisis. “Do you wish you had left a residual force in Iraq? Any regrets about that decision in 2011?” a reporter asked. “Well, keep in mind that wasn’t a decision made by me,” Obama said. “That was a decision made by the Iraqi government.”
Both quotes from the WP
In Domestic Affairs:
“They’ve said no to extending unemployment insurance for more than three million Americans who are out there looking every single day for a new job, despite the fact that we know it would be good not just for those families who are working hard to try to get back on their feet, but for the economy as a whole,”From Roll Call
This effort seems to be the main reason (besides the ongoing decline in labor participation rate) for the recent decline in unemployment.
The Impact of Unemployment Benefit Extensions on Employment: The 2014 Employment Miracle?
It is not clear-cut that he is taking credit, but he sure is't claiming that it is in spite of his efforts.
"Tonight, after a breakthrough year for America, our economy is growing and creating jobs at the fastest pace since 1999," Obama said to applause. "Our unemployment rate is now lower than it was before the financial crisis."CNS News (Quotes are also available in the transcript from the 2015 State of the union address.)
Interesting side note: from Wikipedia
The cognate of chutzpah in Classical Arabic, ḥaṣāfah (حصافة), does not mean "impudence" or "cheekiness" or anything similar, but rather "sound judgment".