Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

qvabhijeet
New Contributor

ABC

Test

1 Reply

Re: Generating dates and sales according to given period

Try this:Capture.PNG

Sampledate:

LOAD salesID,

  ID,

  Date(Date + IterNo() - 1) as Date,

  Period,

  Sales/Period as Sales

While IterNo() <= Period;

LOAD * INLINE [

salesID, ID, Date, Period, Sales

{0AA84B07}, {879831F6}, 02/02/2009, 12, 997206.7039

{0AA84B07}, {879831F6}, 02/02/2010, 13, 1063106.796

{5323BCF3}, {501CFB1E}, 02/02/2011, 1, 29.50819672

{E2C591D8}, {879831F6}, 02/02/2011, 1, 819.6721311

{071B67FB}, {879831F6}, 02/02/2011, 12, 655.7377049

{0AA84B07}, {879831F6}, 02/02/2011, 24, 1112068.966

{0F692A1C}, {4F0929F4}, 03/02/2011, 1, 571.4285714

{BF73D66A}, {4F0929F4}, 03/02/2011, 1, 1662.5

{5323BCF3}, {501CFB1E}, 03/02/2011, 1, 29.50819672

{E2C591D8}, {879831F6}, 03/02/2011, 11, 1612.903226

{BF73D66A}, {3B8FC92D}, 04/02/2011, 1, 892.8571429

{5323BCF3}, {501CFB1E}, 04/02/2011, 1, 29.50819672

{5323BCF3}, {501CFB1E}, 05/02/2011, 1, 29.50819672

];