It depends what you are keeping. Personally, I wouldn't want more than around 20ppm for freshwater.
Yup, some test kits are very inaccurate, such as the API ones. I used them until someone on here advised me for the better. Salifert / Seachem are a better option.
What I should have said is the vast majority of fresh water fish that are bread in captivity will be fine with 40ppm nitrate.
Most fish have been bread in normal tap water over multiple generations and no longer have their affinities to set water conditions. Just look at discus as an example. But there are some exceptions.
PH and hardness is a much bigger consideration for those exceptions.
If your really worried about nitrate, dose potassium sulphate in your mix rather than potassium nitrate.
http://www.co2art.co.uk/collections/aquarium-fertilizers/products/potassium-sulphate-k2so4
But what you need to do is answer this question yourself.
"Are my fish happy?" (i.e. color, temperament, eating, free from disease etc)
If the answer is yes, you don't need to worry about 40ppm nitrate.
EDIT:
VFR_KID can you confirm what is coming out of your tap?
Check your post code on the Scottish water website and it will tell you. I had a quick look at a few areas around Fife and and it suggests anything between 0 and 15, if that is the case and your getting up to 40 in the tank after a week is a bit of a worry.
If is the case it could be down to any number of reasons:
You test is inaccurate/wrong.
Your dosing way too much.
Your overstocked.
Feeding too much.