Do I need to take proportionate expenses and depreciation in the case where I rented property and tried to sell it but couldn't sell? It was never used for personal use.

In this case the property was rented for 150 days and rest it was for sale. Please advice.