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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Help on Selecting Month as default selection

Hi Team,

Hope all re doing good....!

I need help on selecting the month which has recent data as a default selection while opening the application.

For Ex: i have year filed 2015 and in 2015 i have data till may only.

so when i opened my application by default it has to show may.

my month filed has month names not numbers.

i tried Max(month) in document triggers but its not working.

Please help on this.....

Thanks in advance...

Nani.

22 Replies
daniel_kusiak
Creator II
Creator II

In script add ceil(month(date_field)) as month_no and after reload put max(month_no) in document triggers.

Not applicable
Author

Thanks for your reply...

is there any way we can do it without modifing in script?

jagan
Partner - Champion III
Partner - Champion III

Hi Nani,

Try like this

Settings -> Document Properties -> Triggers -> Document Event Triggers-> On Open -> Add Actions-> Add -> Selection-> Select In Field ->

Field - Year

Search String - =Max(Year)

Again Add -> Selection-> Select In Field ->

Field - Month

Search String - =Max(Month)

Finally give OK -> OK -> OK

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Thanks for responding.

I did the same as u mentioned above, Year is getting selected but not month.

when I tried Max(Month) in a test object its displaying "5" as result instead of May.

my month field contains month names not month numbers. so it is not getting selected.

Thanks,

Nani

daniel_kusiak
Creator II
Creator II

For me it dosen't work otherwise.

daniel_kusiak
Creator II
Creator II

Try date(max(ceil(date_field)),'MMM') in document triggers.

See the attached file.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=Text(Max(Month))


Regarsd,

Jagan.

Not applicable
Author

By default it is showing Jan as Month.

But I have to display May.

Not applicable
Author

Hi Jagan,

Tried, But no luck result is same 5.