Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How force function AddMonths work?

Hi to all!

I have field with Date, and in SET ANALYSIS i need Date bigger at 1 month.

But AddMonths Does not work...

Look in attach.

1 Solution

Accepted Solutions
Not applicable

Re: How force function AddMonths work?

use dis in set CurrDate ={'$(=AddMonths(CurrDate,1))'}

9 Replies
Gysbert_Wassenaar
Not applicable

Re: How force function AddMonths work?

In a text box you can use =AddMonths(CurrDate,1) if you first select one value in the field CurrDate.


talk is cheap, supply exceeds demand
Not applicable

Re: How force function AddMonths work?

Do not use Dollar expansion in text object, use it Like =Addmonths(CurrDate,1)

Not applicable

Re: How force function AddMonths work?

yes, i know.

but i use AddMonths in SET ANALYSIS, and there $(=AddMonths(CurrDate,1)) does not work, because this function doesn't result a date.

and a textboxes i add for clarity.

Not applicable

Re: How force function AddMonths work?

yes, look my answer above

Not applicable

Re: How force function AddMonths work?

Привет!

CurrDate - это поле, Set Analysis не принимает поле, как правую часть условия, ему нужно конкретное значение. Попробуй использовать функцию p():

$(=AddMonths(p(CurrDate),1))

Gysbert_Wassenaar
Not applicable

Re: Re: How force function AddMonths work?

Because your field CurrDate doesn't contain any value that's exactly a month later than another value. If you add such a value you can see that addmonths does work. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable

Re: How force function AddMonths work?

use dis in set CurrDate ={'$(=AddMonths(CurrDate,1))'}

Not applicable

Re: How force function AddMonths work?

Он прекрасно принимает поля. когда в них выбрано одно значение. Если не выбрано ничего или выбрано несколько то конечно ничего работать не будет.

Not applicable

Re: How force function AddMonths work?

Thank You, i just forgot to put quotes in textbox

If in TX08 put text "='$(=AddMonths(CurrDate,1))'" - all works perfectly!