flatten button doesn't work for an object

hi everyone.i want to flatten the attached detail to see if it would look like in the first picture but as you can see in the picture named training 1 it doesn't work,can someone help me figure out the problem if possible?

SolidworksSheet Metal