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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
ychaitanya
Creator III
Creator III

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
MVP
MVP

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