Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
ferha_jafri
Partner - Creator III
Partner - Creator III

Issue with default selection current year ,with current month's max week

Hello Everyone,

I have an issue with current selection.As per client req. when nothing is selected for year,month and week then default selection should select current year,current month with max week of that month.I have week as 1,2,3,4,5....and so on so my issue is that when i write an expression for current selection with max month and  max week it is selecting 53 week and 12 month...please help me on this it is urgent as  need to show the client by end of the day

Thanks in advance

Ferha Jafri

1 Solution

Accepted Solutions
sparur
Specialist II
Specialist II

hi. I think you should create an Action for autoselect values and attach this Action for OnOpen document trigger.

in the action you should create 3 Actions with such sequence: Year -> Month -> Week

Expressions should be like this:

for Year: =year(Today())

for Month: =month(Today())

for week: =max(Week)

If you don't want create special sequence, you can create special expression for week like this:

=max({<Month = {$(=month(today()))}>} Week)


View solution in original post

2 Replies
sparur
Specialist II
Specialist II

hi. I think you should create an Action for autoselect values and attach this Action for OnOpen document trigger.

in the action you should create 3 Actions with such sequence: Year -> Month -> Week

Expressions should be like this:

for Year: =year(Today())

for Month: =month(Today())

for week: =max(Week)

If you don't want create special sequence, you can create special expression for week like this:

=max({<Month = {$(=month(today()))}>} Week)


ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Thank you so much it worked for me