All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Zakah is not due on the value of a rented property rather it is due only on the rent if the accumulated rent itself or with the other amounts, gold, and silver, reaches the Nisaab (the least legal amount on which Zakah is due which is 85 grams of gold or its value) and a complete lunar year passes after owning it.
Now, you have to pay the Zakah of the amounts you have with you including the amount you got after selling the building if a lunar year passes after possessing the money. Know that the year for paying Zakah begins when the amount reaches the Nisaab. For details, read Fataawa: 85335 and 85458.
Allaah knows best.