Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Maximum Week When Open Tab

How do I code so that the maximum week (starting on Mon) is selected when a tab is selected.  I have the following fields:

PostDate:  date posted

WeekSort: numeric value for the week

StartofWorkWeek:  Has the format of "Mon - 03/12/18".  It is sorted using Week Sort

I tried the following in the Trigger tab of Properties for the tab without success:

Action=Select in Field

Search String:  ='=date(max(WeekSort))'

Field:  Weeksort

1 Solution

Accepted Solutions
4 Replies
ychaitanya
Creator III
Creator III

Your WeekSort has numeric values, why are you converting to Date in the Trigger Actions  ?

You could just use Max(WeekSort)

Anonymous
Not applicable
Author

Is this the right syntax:

='=max(WeekSort)'

I am getting all Weeksort selected when I do this.Multple Week Sort.png

ychaitanya
Creator III
Creator III

=Max(WeekSort)

MarcoWedel

Hi,

one example using only the StartofWorkWeek field loaded as Dual value (i.e. not only text):


QlikCommunity_Thread_295775_Pic1.JPG

QlikCommunity_Thread_295775_Pic2.JPG

QlikCommunity_Thread_295775_Pic3.JPG


tabCalendar:

LOAD *,

    Date(WeekStart(Date),'WWW - MM/DD/YY') as StartofWorkWeek;  

LOAD Date(MinDate+IterNo()-1) as Date

While MinDate+IterNo()-1 < MaxDate;

LOAD MakeDate(2017,1) as MinDate,

    MakeDate(2017,6) as MaxDate

AutoGenerate 1;



hope this helps

regards

Marco