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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Toggle switch

Hi Qlik Experts,
Today I was trying to select different field values on qlik using toggle. I have a field with two values Y and N. I want to have a action such that on click
click 1. It selects Y and Displays measured only

click 2. It selects N and displays non measured site
click 3. It selects N & Y , displays both included. and then continues to 1,2,3 so on

Thanks

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one solution might be also:

QlikCommunity_Thread_271912_Pic1.JPGQlikCommunity_Thread_271912_Pic2.JPG

QlikCommunity_Thread_271912_Pic3.JPG

QlikCommunity_Thread_271912_Pic4.JPG

QlikCommunity_Thread_271912_Pic5.JPG

hope this helps

regards

Marco

View solution in original post

5 Replies
effinty2112
Master
Master

Hi Naveen,

try these two actions and use the one you prefer, replace Filed with your fieldname:

=if(isnull(GetFieldSelections(Field)),'Y',Pick(Match(GetFieldSelections(Field),'Y','N'),'N',''))

=if(isnull(GetFieldSelections(Field)),'Y',Pick(Match(GetFieldSelections(Field),'Y','N'),'N','**'))

cheers

Andrew

Not applicable
Author

Hi Andrew,

Thank you for your response. I tried the expression you provided and for me it toggles between only N, N and Y combined. I would like it to select N on first click Y on second both on third and if clicked fourth time it selects N and then Y so on. Is that possible. I have tried what you suggested and attached it here.

Thanks

MarcoWedel

Hi,

one solution might be also:

QlikCommunity_Thread_271912_Pic1.JPGQlikCommunity_Thread_271912_Pic2.JPG

QlikCommunity_Thread_271912_Pic3.JPG

QlikCommunity_Thread_271912_Pic4.JPG

QlikCommunity_Thread_271912_Pic5.JPG

hope this helps

regards

Marco

Not applicable
Author

Thank you Marco, that worked exactly like how i wanted.

MarcoWedel

you're welcome

glad you liked it.

Marco