I have a 02 X7 (197) and I had my gauges stop working this past summer after a rain storm. then when I went to crank, got the red light on dash. Gauges read low, or not at all. I read and read on these forums. Read about other users who found the key ignition was installed upside down in 2002 (possibly other years). Can't remember if if the proper way for key is notches up or down. But the way you can tell is look under dash at the back of the ignition module, you are looking for drain holes at the bottom, if none, take the panel off and flip the ign over.
with the drain holes in bottom, moisture can drain out. (proper way)
with drain holes in top, water goes in and gets trapped, potentially causing a short or false start. (incorrect way)
I found my ign module was upside down. I flipped it. This fixed my problem. May or may not help you. Thanks.