An associate will not be consolidated, only equity accounted, so there is no goodwill calculation.
For a subsidiary, you need to calculate the fair value of the net assets of the subsidiary, so you would deduct the payables and the fair value of all other liabilities from the fair value of all the assets in order to find the net assets.
Thank you sir. And you are right it was about subsidiary . I have an another question, what the impect in profit and loss statement if negative goodwill arise?