Too bad, but that code may be from the fuel pump. The fuel level senders are in the pump. There is a test in hidden OBD menu, search for the same and check the units.
There are a couple of threads here and bimmerforums about this code. Check them out.
Although replacing the fuel filter is always good, but it may not solve your issue if its sensor in the fuel pump.