Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

create dynamic bookmark for current and previous year

Hi all,

i am trying to create a bookmark to select the current and previous fiscal years to be used in NPrinting. the bookmark needs to be dynamic though and i am struggling to get it working.

i have a field called 'FisYearNo' which has values as follows..

2016

2015

2014

2013

etc

these also relate to a field that is used in a dashboard called FiscalYearLabel which has values as follows..

2015/2016

2014/2015

2013/2014

2012/2013

etc

i am trying to just make a dynamic selection on FisYearNo by using the following syntax in a list box for FisYearNo

=>=max(FisYearNo)-1

I am guessing with the above syntax i should get 2015 and 2016 but i am getting all years as 'white'.

Does anyone know what i am doing wrong please or suggest another approach.

I have attached a sample.

10 Replies
ecolomer
Master II
Master II

Is this you need?

p32.png

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, thanks, thats the result i need but i need it in a bookmark. i cant bookmark that as it will select those values no matter what the current year is.

the bookmark is needed for an NPrinting filter, so it needs to be dynamic.

ecolomer
Master II
Master II

Yes, now?

ecolomer
Master II
Master II

Now you have a Bookmark = "MyBookMark"

Is ok?

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi

That bookmark does nothing....

ecolomer
Master II
Master II

When you push buton, the value are selected and updated the bookmark

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, i dont think you understand my requirement.

i need a bookmark to dynamically select the current fiscal year and the previous fiscal year.

the bookmark is to be used by NPrinting, not to be used by a qlikview user so no 'Button' can be clicked in QlikView first.

ecolomer
Master II
Master II

In my example, you have an buton to activate the selection and update the bookmark.

Now you can activate a trigger when open the QV file execute the buton and ....

henrybrinkmann
Partner - Contributor II
Partner - Contributor II

Hi!

You can try to create a 3rd field with age(). Then bookmark '0 Year' and '1 Year'. Next year the value FisYearNo changes, but your bookmark is still correct.

Date:

Load * inline [

FisYearNo, FisYearLabel

2016, 2015/2016

2015, 2014/2015

2014, 2013/2014

2013, 2012/2013

]

;

Date2:

LOAD *,

  age(Today(), MakeDate(FisYearNo)) & ' Year' as ForBookMark

Resident Date;

drop Table Date;

BR

Henry