Flux density to flux
If the normalised filter response function is $R_{\nu}$ then the measured  flux is
$$ F = \int f_{\nu} R_{\nu}\ d\nu  $$
The integration is done over the frequency range of the filter.

If you measure a flux through a filter then the process cannot be inverted exactly. However the average flux density can be found by dividing the total flux by the effective frequency range
$$\langle f_{\nu} \rangle = F/ \int R_{\nu} d\nu $$