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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

show specific field ranges as drop down menues / filters

hiya

I wish to show different field range drop down menus

e.g

1. date

date is derived from order date. I want to in the data load editor run a but of script that will create a new year selector (year specific)  drop down that e.g only shows years from 2010 onwards

at the moment mine shows all years 2015 to 1989, but I want to show just from 2010 onwards, as all data is irrelevant or old.

or is the a way to get the filter pane to sort by expression only show year 2010 and other years onwards?

2. department

each department has a code Department code xxx111, xxx222, xxx999 ect

same again I want to in the data load editor run a but of script that will create a new department selector  (department specific) drop down that e.g only shows departments with codes that end xxx999 only

or is the a way to get the filter pane to sort by expression only show using department code xxx999  departments only?

please help

kind regards

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you create the field in the derived calendar then try:  if(Year($1) >= 2010, Year($1)) as DropDownYear,

If you want a dropdown field for the department name then use the Department name instead:  if(Wildmatch(DepartmentCode, '*999'), DepartmentName) as DropDownDepartmentName


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

LOAD ...some fields ...,

     if(Year >= 2010, Year) as DropDownYear,

     if(Wildmatch(DepartmentCode, '*999'), DepartmentCode) as DropDownDepartmentCode

FROM ...


talk is cheap, supply exceeds demand
joeybird
Creator III
Creator III
Author

Hiya

thanks for above

year code does not work, I did try it, but the dropdown is blank.

my calendar is derived by below

Calendar: DECLARE FIELD DEFINITION TAGGED '$date'
Parameters first_month_of_year = 1,
fiscal_first_month_of_year = 4

Fields

     Year($1) As Year Tagged '$year',
    
     if( Month($1)>=4, Year($1), Year($1) -1) as FiscalYear Tagged '$fiscalyear', 
    
    
     Month($1) as Month Tagged '$month',
    
     if( Month($1)>=4, Month($1)-3,Month($1)+9) as FiscalMonthNumber Tagged '$FiscalMonthNumber',
    
    
     Date($1) as Date Tagged ('$date', '$day'),

     Week($1) as Week Tagged '$week',

     Weekday($1) as Weekday Tagged '$weekday',

     'Q' & Ceil(Month($1)/3)  as FinancialQuarter Tagged '$FinancialQuarter';

DERIVE FIELDS FROM FIELDS [OrderDate] USING Calendar;

department

the code does work ...as it only shows codes with xxx999

  if(Wildmatch(DepartmentCode, '*999'), DepartmentCode) as DropDownDepartmentCode

however I only want the departments with those ids

please help

Kind Regards

Joeybird

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you create the field in the derived calendar then try:  if(Year($1) >= 2010, Year($1)) as DropDownYear,

If you want a dropdown field for the department name then use the Department name instead:  if(Wildmatch(DepartmentCode, '*999'), DepartmentName) as DropDownDepartmentName


talk is cheap, supply exceeds demand
joeybird
Creator III
Creator III
Author

Hiya

that's brill, thanks so much for this xx

kind regards

joeybird