Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting Previous Year as text


Hi,

I am selecting a month (ex- Sep 13) from list box. I have text box where in I want to display Oct 12 as output.

Any idea how to do that.

I tried with the following

 

=

date(num(Month-365),'MMM-YY')

But, it doesnt work. It throws Sep 12. Here Month is a field in table having values like May 13, June 13 etc..

1 Solution

Accepted Solutions
PrashantSangle

Hi,

If you want output in MMM YY format

Then write

Date(AddMonths(Date#(YourField,'MMM YY'),-11),'MMM YY')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

View solution in original post

4 Replies
PrashantSangle

Hi,

Try this

AddMonths(Date#(YourField,'MMM YY'),-11)

or

use AddYears(Date#(YourField,'MMM YY'),-1)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
PrashantSangle

Hi,

If you want output in MMM YY format

Then write

Date(AddMonths(Date#(YourField,'MMM YY'),-11),'MMM YY')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

View solution in original post

Not applicable
Author

Thanks mate..it works..

jyothish8807
Master II
Master II

Hi Vimal;

Try:

=Date(Addmonths(date#([Your field]),-11),'MMM YY')

Regards

KC

Best Regards,
KC