Where high nitrates are present in tap water (in the range of 30-50ppm) I believe it is more likely that the nitrates are present due to seasonal fertiliser run-off from agricultural land, depending on where you live.
daize would you like the links to a couple of rather long Ph.D. dissertations which deal with the topic of first, nitrification in public supply systems and then another with the presence of nitrification that happens in private premise plumbing. There is actually more nitrification going on in the private pipes in homes and apartment buildings than you would realize. btw- in the States the limit on nitrate in tap water is about 45 ppm on an API kit (this is 10 mg/l NO2-N). So 30-45 is considered acceptable rather than high? And lets not forget in established planted tanks with roots in the substrate there will soon be anaerobic denitrification happening.
While the source of nitrate in water supply systems on the input side may be from agricultural runoff, the water supply system removes much of that sort of thing before the water heads out to homes. What happens along the way is nitrification which acts to return nitrate to the water. But water quality regulations apply only to the public supply system. A water company must meet the standards set in the regulations. Only inside the public supply system is water regulated, at the point where it feeds into private plumbing, the regulations no longer apply and nobody is checking. So even when the water company has taken steps to bring down nitrate levels, there are ways they rise back up since once the water is in the private pipes, there are no rules. Water can sit in parts of the system unused for days. Think guest bathrooms, basement water supplies etc. If your pipes are creating nitrate, this is not from runoff or even from the public supply itself. And if your water company uses chloramines, the ammonia needed by the bacteria is being sent their way.
As for your nitrate levels going between 10 and 40 ppm, in the states both are allowable levels. So a water company simply would not care which of the two is coming out of their pipes as far as regulations are concerned- there is no difference.
But again I wonder, are you trusting your nitrate test kit to detect with accuracy 10 ppm vs 40 ppm or to get either reading correct? A decent low end Hach Nitrite-Nitrate kit runs about $133.
http
/www.hach.com/nitrate-nitrite-test-kit-model-ni-12/product?id=7640220989# Note, even though they use a single reagent, you still have to shake it really well and then let is sit for some time.