Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Subtracting 1 month from date susequently

Hello Experts,

I want to subtract from 1 month subsequently from current date. For example today is 25/03/2015, I want to see data as 25/02/2015

25/01/2015

25/12/2014

.

.

..

like this

Can anybody suggest how to do this.

Regards,

Kumar Reddy@

5 Replies
sushil353
Master II
Master II

Hi

Try this:

Addmonths(Today(),-rowno())

HTH

Sushil

Anonymous
Not applicable
Author

Hi,

I am new to qlikview, Can u pls explain in detail.

Regards,

Kumar

sushil353
Master II
Master II

Addmonth function will add month in your date.

so here we have date as today() date and rowno will generate a sequence in your table from 1 to n..

so at each level 1 month will be subtracted from today's date.

HTH

Sushil

Anonymous
Not applicable
Author

Actually this is my requirement

Date values are coming from date column and those metrics have been calculated based on counts. I have calculated expression, but the problem is with dates.

Regards,

Kumar

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Try this

Dats:

load

AddMonths(date,-1) AS New_date,

* Inline [

date,sales

12/02/2015,100

15/02/2015,50

20/03/2015,80

30/03/2015,600

];

The New_date would be your Page column

Hope this helps