check the correction of the relation P=hdg, where P is pressure , d is density,h is height and g is acceleration due to gravity
$$begin {align}
Here,
& P = hgd---(1)
& Dimensional formula of pressure = [ML^{-1} T^{-2}]
& Dimensional formula of height = [L]
& Dimensional formula of density = [ML^{-3}]
& Dimensional formula of acceleration due to gravity = [LT^{-2}]
& From (1)
& [ML^{-1} T^{-2}] = [L] × [ML^{-3}] × [LT^{-2}]
& [ML^{-1} T^{-2}]= [ML^{-1} T^{-2}]
end {align}$$