The value in the books is not necessarily the value in the fiction. The value given in the DMG is more or less a multiversal inherent value. A base that is modified by setting, subjective values, economic pressures, etc. So if you need a 5000gp diamond, the typical diamond from the DMG will do, even if the people of the setting hate them and they are found like sand on the beach and they sell them for 1sp. The magic only cares about that book value, not the value modified by other fiction influences.
The dust from that 5000gp diamond will also be 5000gp worth of diamond dust, regardless of what the locals will pay or sell it for.
It the diamond is say half the typical size, then the diamond and dust will be worth 2500gp for spell purposes.
See my above response. Hopefully that clarifies your questions. If not, ask more questions and I will try to explain.