Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

By default Rolling 12 months

I my application  there is requirement that i have to rolling 12 months from current month of the year by defualt, i.e when we open application the data for rolling 12 months should be displayed and otherwise data for the period selected in the list box should be displayed.........

So can we get some idea on this...?

i have tried some thing in trigger section but no success.......

8 Replies
jjfabian
Partner - Creator III
Partner - Creator III

Triggers are the right place to look.

Have you tried making an on open document trigger with a select in field in your month field with month(today())+n as search string?

But beware that this will give you a numerical value back!

Example & Best Practice:

Today is 29.06.2012 so month(today()) wil give you a '7'. This may or may not work as serach string, depending on how your month field looks. As a best practice I always try to have numerical months available in my data model, so that numerical functions like the one above can be used.

Regards,

Jakob

Not applicable
Author

Thank for the reply, but It’s not working……..

jjfabian
Partner - Creator III
Partner - Creator III

Well, ...

what specific triggers did you add?

and

what format does your month field have?

Not applicable
Author

I have applied month(date#(today(),-12)

jjfabian
Partner - Creator III
Partner - Creator III

That expression is not going to work.

If you're having trouble writing the expressions, I suggest "testing" them in a text object first

=month(today())-1 is the correct syntax

Not applicable
Author

Hey its not working….

Is there something like addmonths include here?

jjfabian
Partner - Creator III
Partner - Creator III

You can use addmonths in QlikView. Look in the QlikView help, it's very detailed.

I generally use addmonths as part of Set Analysis to display rolling months in charts, etc.

Not applicable
Author

Hi,

I think you can use like this

sum({1<Datefield={">=$(=addmonths(monthend(max(Datefield=))+1,-12)) <=$(=max(Datefield))"}>}

Sales)