dB it self just express in a logarithmic scale a ratio between two values and it self is unit independent (because is a ratio). Just because the most common uses of dB scales are linked to intensity or power doesn't necessarily mean that can't be used to represent other ratios of different types of quantities. Or at least I couldn't find any definition that restricts the use of dB in such cases. The formulas to express such ratio are present here you just have to figured it out what is really your ratio.
So, for example, if you have some kind of sensor that somehow the output is a frequency, let's say something like
f(x) = ax + f0 [Hz]
There is no reason why you can't express this function in a logarithmic ratio scale using dB something like, related to f0 or f(x=0)
L(x) = 10*Log10*(f(x)/f0) [dB]
which would give you the represented dB output of your equation with respect to x.
But since we are in arduino stackexchange and talking about sensor, the common use of dB in electronics is the representation of power ratio or (the more common) a frequency response of a circuit(or system) that is represented by a Bode Plot, so I advise you to really take a good look at both links and try to figure what you really are asked to represent.