Dar la vuelta a la tortilla

dˈaɾ lˈa bwˈelta ˈa lˈa toɾtˈiʎa

Spain

Literally meaning To turn the omelette around. It means to change a situation.