Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Solved
You could do it like this:
Trans:
LOAD Date#(PERIOD, 'YYYYMM') As PERIOD,
SALES
Inline
[
PERIOD, SALES
201312, 264
201401, 675
201402, 235
201403, 236
201404, 124
201405, 672
201406, 643
201407, 124
201408, 643
201409, 252
201410, 257
201411, 743
201412, 257
201501, 723
201502, 245
];
Join (Trans)
LOAD PERIOD,
If(Month(PERIOD) = 1, PREVIOUS(SALES), Alt(Peek(PYSALES), SALES)) As PYSALES
Resident Trans
ORDER BY PERIOD;
SALES / PYSALES As INDEX
Resident Trans;
(Change INLINE to a load from your correct data source)