Assalamu Aleykum, Is it allowed to take an oath apon one self like , "By Allah i only eat soandso Calories until i weight soandso kg"?

Ustadh AbdulAziz al-Haqqan
Don't. If you do not have the will and determination to do something then why you make an oath, to break it? Make dua and depend on Allah and take very strict measures and a helpful environment.