If you mean: Can I compute a variable in the first fragment and pass it around? No, not like that. The fragments are processed in parallel.
If you need to do that, compute the variable CPU side and pass it in as a uniform. If you needed to do a lot of computation you could output to a texture or a buffer and then read it back, but you only need one float from the sounds of it.