One often overlooked element when adapting to a healthing diet with less packaged and processed foods is that the high quality mineral rich salt (Not the bleached, highly processed table salt!) intake is often too low. The nutritional ketosis video link I had posted before also mentions this.
Another element I did not mention on this thread is checking your water quality. Especially when you are drinking reverse osmosis (RO) water, without minerals added back in, you are drinking de-mineralized water which is very unhealthy. For some reason this is very popular in the US from bottled versions, expensive home filtration systems, to water shops, and the deceptive marketing is allowed to call it potable water. Just look at the World Health Organization (WHO)'s report on this.
You can buy electrolyte pills that you can dissolve in water, without any sugary garbage in it.
Imbalances were a symptom in my case of malabsorption, exocrine pancreatic insufficiency (EPI), etc. So, if you have not already crossed off any form of malabsorption and tackled that, it is another good area to look at.
It is tough, unless extremely off, to spot deficiencies through the standard blood tests, as the body tries very hard to maintain an electrolyte balance in the blood.