It is also possible to add a second Expression to calculate "VJP" (last years comparison period) additionally to "VP" (last comparison period, e.g 1 month before):
But it came up that the user wants to select multiple time dimensions. And that makes this solution not work anymore because of the "before" approach.
What is important to know is we have different time dimensions that should be sorted independent.
E.g. Mth10 (oldest) to Mth1 (newest) but M2017/01 (oldest) to M2017/12 (newest) and so on. So the sort in Timedimension A->Z etc. ist not working and the before/after calculcation is not working anymore and we need to use a field "TimedimensionSort".
The result is that it seems like VP is working, but VJP not because QlikView does not know what is the correct "before" or "after" column. The calculated values are wrong and without any regularity the columns will not be calculated. But on the other hand, I don't see a possibility to have the calculation without before/after.
Attached you will find an application with test data and the expressions to play around.