HOW TO CALCULATE RSSI USING TX POWER AND INSTANT RSSI VALUE AND ENVIORNMENTAL FACTOR

Hello,

I want to calculate RSSI using TX power(Measured power at 1m) and  instant RSSI getting in NRF CONNECT APP  and Environmental factor.

I have used   this 

           Distance = 10 ^ ((Tx – RSSI)/(10 * N))        WHERE     TX -POWER AT 1METER,N- ENVIRRNMENTAL FACTOR,RSSI VALUE FROM NRF APP.

but calculation are wrong/ not matched with expected .

Let me know the what needs to do in this case also environmental factor what needs to be set.