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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

How to create a customize filter/selection/listbox

Hi guys,

i have created a pivot table. in my correctio column, actually consists of value C,D.

But my client wants to have a selection box which can give the client a choice of choosing view "C Only", "D Only", "C & D" , "All".

So, i do not know how to create this filter. I have tried to create in the script editor as such:

if(correctio_tip = 'c', 'C',

if(correction_tip='d','D',

if(correction_tip='c' or 'd', 'C & D')))

screenshot.png

Help help help

Rgds

Jim

Labels (1)
34 Replies
jim_chan
Specialist
Specialist
Author

Hello Manuel,

i have used this script too. Now i do not know should i group by few more fields or just group by cust_id. i have selected "C&D" but.. it is still listing all out.

Unlike your sample thats amazing. that;s what i am looking for...

LEFT JOIN Competition

LOAD

     cust_id,

     concat(DISTINCT correctio_tip,'&') as MyField2

RESIDENT Competition

//if you want, you can add more fields to group, like categories or dates

GROUP BY cust_id;

MyFilter:

LOAD DISTINCT MyField2 as MyFilter RESIDENT Competition;

CONCATENATE

LOAD 'All' as MyFilter AUTOGENERATE 1;

screenshot.png

Anonymous
Not applicable

Hi Jim:

If you want to add more fields on group by, yo need to include it on LOAD:

LEFT JOIN Competition

LOAD

     cust_id,

     date,

     starttime

     concat(DISTINCT correctio_tip,'&') as MyField2

RESIDENT Competition

//if you want, you can add more fields to group, like categories or dates

GROUP BY cust_id, date, starttime;

MyFilter:

LOAD DISTINCT MyField2 as MyFilter RESIDENT Competition;

CONCATENATE

LOAD 'All' as MyFilter AUTOGENERATE 1;

Regards!!!

jim_chan
Specialist
Specialist
Author

can I ask a stupid question ? why when i add Group by date, starttime, i need to include it in the Load as well?

jim_chan
Specialist
Specialist
Author

Thanks alot Manuel, you have finally resolved my problem haha!

Anonymous
Not applicable

Hi Jim, all fields included on group by must be on load.

I am glad to help you.

Regards!!