Hi Jacobsson,
You'd need a 'print time' formula to be able to achieve this and unfortunately, print time formulas evaluate when a row is 'printed'.
On the Page Header, the variable will have no visibility as it's being evaluated in a section below.
-Abhilash