Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Now my label only display Jan - Dec , How to make it display Jan - Dec 2016 ?

Hi ALL


Below expression from Manishi , it does not display year 2016 after Jan - Dec

='Jan - '&SubField('$(MonthNames)', ';',  $(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today())))))& ' ' & ''  &ColumnDim51& ' ' 

Can you help to add year number ?

Paul

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi.


Please try the following for your label.

='Jan - '&SubField('$(MonthNames)', ';',  $(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today())))))& ' ' & ' ' & max(year) & ' '  &ColumnDim51& ' '

View solution in original post

7 Replies
paulyeo11
Master
Master
Author

my qvw

sunny_talwar

Are you looking for something like attached?

Anonymous
Not applicable

Hi.


Please try the following for your label.

='Jan - '&SubField('$(MonthNames)', ';',  $(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today())))))& ' ' & ' ' & max(year) & ' '  &ColumnDim51& ' '

paulyeo11
Master
Master
Author

Hi sunny

Thank you very much for your expression for 2016 is working fine , I try to modify your expression to make it display 2015 :-

='Jan - '&SubField('$(MonthNames)', ';',  $(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year)-1)'}>}month), Num(Month(Today())))))& ' ' & ' ' & max(year) & ' '  &ColumnDim51& ' '

it does not work. ( Meaning if user select year = 2016 , i need above expression display 2015.

Paul

paulyeo11
Master
Master
Author

Hi sunny

One more question , i notice the file is upload to this post the file size is only 1.7 Mb.

But when you open and save the file become double size.

What it the reasons ?

Paul

paulyeo11
Master
Master
Author

Hi Bon

I though you are sunny , any way both of you give the correct answer , thank you.

='Jan - '&SubField('$(MonthNames)', ';',  $(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today())))))& ' ' & Max(year) & ' '  &ColumnDim51 

Paul

paulyeo11
Master
Master
Author

Hi Sunny

After i look closely of Bon expression , where he high light the additional code he add to make year number display out , so i try to add year-1 from year and it work fine now.

Thank you

Paul