Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
omyahamburg
Creator II
Creator II

show or hide column by selection

Hello

I have a table as below shown. By choosing values from the Selection listbox I want to hide/show the columns in my table.

I tried with conditional show

 

GetFieldSelections(Selection)='Quantity'  which works for the first column, but if I add to the others

the corresponding expression it does not work any longer.

I do attach the sample.

selection.jpg

best regards

Joerg

Can someone let me know what I am doing wrong ?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If you select more than one value the getfieldselections returns more than just the value you want to check for. Use substringcount instead:substringcount(concat(Selection),'Quantity')


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Gysbert_Wassenaar

If you select more than one value the getfieldselections returns more than just the value you want to check for. Use substringcount instead:substringcount(concat(Selection),'Quantity')


talk is cheap, supply exceeds demand
omyahamburg
Creator II
Creator II
Author

Thanks Gysbert

You saved my day.

Joerg

Anonymous
Not applicable

Hi Jorg

I want to do the same but I have now knowledge syntaxis used here. Could you explain me the step by step of how to do it?

omyahamburg
Creator II
Creator II
Author

Hi Lucas

Unfortunately I have to leave my Office right now, but try to give you an example tomorrow.

Good Morning Lucas

Maybe the attached document helps to understand how it works.

regards

Joerg

brooksc57
Creator
Creator

I am using a LED checkbox for selection of fields and only want the ones a user selects to appear...so basically if ALL then none or if none selected...no columns appear....note: my reason is that there are alot/too many columns when blank.

This is the formula for that scenario

--------------------------------------------------------------------------------------------------------------------------

count(GetFieldSelections(Selection)>0) and substringcount(concat(Selection),'Quantity')

Thanks,

Brooks

apthansh
Creator
Creator

Hi Gysbert -

Can we do this in Qliksense ?

I tried and it doesn't work.See attached QVF.

Also attached are the extension I am using.

Please suggest if you have better solution.

Thanks much.

rwunderlichjontydkpisunnyswuehl

Not applicable

Really simple, thank you. Nice example too.

Shubham_Deshmukh
Specialist
Specialist

But after unselecting the filter, column is not getting hide.