Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sai_katare
Contributor III
Contributor III

Dependent Actions - Current Year & Current Month

Hi, 

 

I have two listboxes. 'Year' and 'Month'. 

My requirement is to create a bookmark for current year and current month. I am not sure how to do this. I tried the following things but did not work:

1. Given two 'Select in Field' actions to a button. Year -> max(Year) and Month -> Maxstring(Month). After 1st action its failing since Maxstring(Month) becomes DEC and we do not have dec yet in 2018!!

Please suggest me how to achieve this functionality. 

All I am trying to give is a bookmark clicking on which the default Year filter selects  current year and the month filter selects current month.

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable

use master calendar, and use Max(MONTH_YEAR) instead of YEAR and Month separately 

View solution in original post

2 Replies
jensmunnichs
Creator III
Creator III

Assuming you have multiple years of data, maxstring(Month) returning december makes sense, since that is the 'highest' month, even if it hasn't happened yet in this year.

If you have a field in your data model that still has the full date, try Month(Max([DateField])) instead (or Year for year).

Though thinking about it now, that would give you the most recent month/year, not necessarily the current month/year. For that you could use Year(Today()) and Month(Today()).

Do you need help creating the actual button + actions as well or is that enough?

Anonymous
Not applicable

use master calendar, and use Max(MONTH_YEAR) instead of YEAR and Month separately