No, even if $\mathrm{d}x$ represents an infinitesimal quantity, it must have the same units as $x$. Moreover, as a density, $f(x)$ will display the inverse units toof $x$. In consequence, if $[X]$ denotes the units of the variable $X$, then one has : $$ [\Bbb{E}(X)] = [x]\cdot[f(x)]\cdot[\mathrm{d}x] = [X]\cdot[X]^{-1}\cdot[X] = [X] $$ Unsurprisingly, the average value of $X$ should possesspossesses the same units as $X$.