Because density changes, it do depends on the state of the substance it's a state variable, for eg you have a cup of water at 4°c at this point the water possess the highest density, but at 0°c the density decreases, due to anamolous behaviour of water molecules by creating a cage mechanised structure.. (then according to your statement you might say both are different, but though they are same just difference in thier states) thus you can't have density alone as a basis