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

Trigger - select last possible month when activating sheet.

Hello,

can someone advice how can I do this?

Thank you.

1 Solution

Accepted Solutions
sunny_talwar

Try this

=MaxString({1<Year = {$(=Max({1}Year))}>}Month)

View solution in original post

16 Replies
sunny_talwar

last possible month based on the selection? based on today? based on max month in the dashboard? Also, what fields do you have in the dashboard? what are there format?

jaumecf23
Creator III
Creator III

Hi,

Go to the Sheet Propierties -> Triggers sheet -> Click the button "Add Action(s)" under On Active Sheet -> OK -> Introduce the field name of the month and the expression to obtain the needed month value.

Captura.PNG

retko1985
Creator II
Creator II
Author

Hi,

field name is Month.

And I want last month that is loaded in the data. So If I have data loaded till January 2018, I want to select January.

Format - I used Month function on date field to get Month field.

Trying to use this, but its not working:

Thank you.

sunny_talwar

First thing, I don't think you need single quotes around Month under Field

Capture.PNG

Second, by selection on Month, you will be selecting Months in 2010, 2011, 2012, .... 2018 (based on how many years you have)... is this what you want?

third, what is the format of the Month field? Is it 2, 3, 4 or is it Jan, Feb, Mar?

Anonymous
Not applicable

Hi,

Did you try remove the single quotes of field?

If this not work, maybe the problem is the Month format.

Reggards,

retko1985
Creator II
Creator II
Author

Actually I want last Year also, but I have Year locked to Always One Selected,

So it need to select last Year also.

Removing '' didnt work, still same.

Moth format is this:

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

Thanks

sunny_talwar

So you have Year as always one selected and you want to select Multiple MonthYears? How is that going to happen? May be use alternate state?

retko1985
Creator II
Creator II
Author

No, Year and Month Listboxes should switch to last available values in the dataset.

I will try to make an example QVW.

retko1985
Creator II
Creator II
Author

Attaching the example:

So, when I switch to the Sheet1, it should select last Year and last Month available:

Thank you.