Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make =year(max(YearMonth)) - 0 as 2013 even i add target for 2014

Hi All

In QV Label is very tricky , if we use =year(max(YearMonth)) - 0 for max year as current year, because user need to activated 2013. and if the expression is not SET , which is YTD , then problem will happen. let below :-

I am using below code , it working fine all the while :-

=year(max(YearMonth)) - 0

Today because i need to start planning for 2014 sales target, i add the 2014 sales target into my QV doc. Now the problem happen , i need to manually change :-

=year(max(YearMonth)) - 0

to

=year(max(YearMonth)) - 1

Just because max year now QV though is 2014 instead of 2013.

Any work around ?

Edit :- when i click on year = 2013 ,  =year(max(YearMonth)) - 0 , will display as 2013 which is normal , but my yearly sales only compute for 2013 . my expression is not SET ANALYSIS , and the rest of the year will not be compute , this is my issue.

Paul

1 Solution

Accepted Solutions
israrkhan
Specialist II
Specialist II

Hi,

You could use Year(Today()), instead of Year Max,.

or use Year(Max(YearMonth))-1, it will give you 2013

View solution in original post

4 Replies
Not applicable
Author

Hi,

     Can you please attach here any sample file.

Regards,

Ashutosh

israrkhan
Specialist II
Specialist II

Hi,

You could use Year(Today()), instead of Year Max,.

or use Year(Max(YearMonth))-1, it will give you 2013

Not applicable
Author

Hi Israrkhan

You are very sharp.

Year Today will be correct solution for me. Because it will not detect max year , also user don't need to select year=2013.

i will implement on my table . so next year i don't have this problem.

Paul

israrkhan
Specialist II
Specialist II

its My Pleasure..