I suspect you're recalling "Dimensions, Anyone" by John D. Clark, Ph.D., published in Analog, November 1966.
The bit about a fool is in the introduction:
A shattering crash rocked the ancient building, and midnight was turned to high noon, and the charred and riven body of the student, stricken by the levin-bolt, sank to the floor.
The mummy laughed out loud. That had been one hell of a big electric charge the student had conjured up, and the damned fool had forgotten that the iron door was grounded!
The joke here is that the bizarre mystic instructions in the incantation had, if analyzed in dimensional terms, ended up evaluating to units of charge.
It's an essay about dimensional analysis, and the origin of the metres-kilogram-seconds (MKS) unit system we currently use (and its extension with Kelvin and Coulombs). From there it progresses into an attempt to find a system of units that can be expressed purely in terms of universal constants like the Planck length, the rest mass of an electron, the velocity of light, etc.