Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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.

16 Replies
sunny_talwar

So, you want to select Year = 2018 and Month = July? But you don't even have July-2018 in your dashboard? Did you mean to select March 2018?

Capture.PNG

sunny_talwar

If March 2018 is what you want... then try these

Year

=Max({1}Year)

Month

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

retko1985
Creator II
Creator II
Author

You are right, its March, apologies ..

It works when I have no month selected, but it wont switch to last month if I have month already selected:

Now when I go back to Main a again to Sheet1, it stays the same.

Thank you.

retko1985
Creator II
Creator II
Author

Adding 1 into Month Set analysis seems to work.. Thank you!!!

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

sunny_talwar

Try this

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

sunny_talwar

Hahahaha yes

Glou
Contributor
Contributor

Hello,
I have to share as I just struggled with this ^^

If you have set MonthNames= like you do, 'Month' is now considerated by the select in field trigger as a text variable.
Therefore you have to recompose your month and get the text value with Text()
(it only works if you convert an actual month object, not the result as a number from 1 to 12)

=Text(Month(MakeDate(Max(Year), Max({<Month=>}Month),1)))