Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Solved

Solved

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

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;

Join (Trans)

LOAD PERIOD,

  SALES / PYSALES As INDEX

Resident Trans;

(Change INLINE to a load from your correct data source)

t1.png

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein