Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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
Valued Contributor II

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

Hi,

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

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

4 Replies
Not applicable

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

Hi,

     Can you please attach here any sample file.

Regards,

Ashutosh

israrkhan
Valued Contributor II

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

Hi,

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

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

Not applicable

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

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
Valued Contributor II

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

its My Pleasure..

Community Browser