Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
RutiTaumanRubin
Creator
Creator

Change the sorting in Field Setting

Hi Everyone,

I will be grateful for your help -

I have field name TimeKeyMonthYear From calendar table,

The field include values in format: Month Year (January 2018).

I want that every time the application will open it will display as default the max value of field TimeKeyMonthYear,

and the user will get an option to change the selection but only to one selection.

Therefore I defined in field setting of field  TimeKeyMonthYear -> Always one selected value.

but the application choose the lowest month as default.

There is an option to change it so the default always will be the max value in field  TimeKeyMonthYear?

 

The calendar table :

 

Date_Time_Key:
Load
TempDate As TIME_KEY,
TempDate As TimeKeyDate,
week(TempDate) As TimeKeyWeek,
Year(TempDate) As TimeKeyYear,
Month(TempDate) As TimeKeyMonth,
Day(TempDate) As TimeKeyDay,
'Q' & ceil(month(TempDate) / 3) As TimeKeyQuarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) As TimeKeyWeekYear,
MonthName(TempDate) As TimeKeyMonthYear,
WeekDay(TempDate) As TimeKeyWeekDay
;

//=== Generate a temp table of dates ===
LOAD
date(mindate + IterNo()) AS TempDate
,maxdate // Used in InYearToDate() above, but not kept
WHILE mindate + IterNo() <= maxdate;

//=== Get min/max dates from Field ===/
LOAD
min(FieldValue('TIME_KEY', recno()))-1 as mindate,
max(FieldValue('TIME_KEY', recno())) as maxdate
AUTOGENERATE FieldValueCount('TIME_KEY');

 

Thank you!

Ruti

 

 

0 Replies