Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Highlighted
Contributor 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
Highlighted
MVP & Luminary
MVP & Luminary

Re: show or hide column by selection

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: show or hide column by selection

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

Highlighted
Contributor II

Re: show or hide column by selection

Thanks Gysbert

You saved my day.

Joerg

Highlighted
New Contributor III

Re: show or hide column by selection

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?

Highlighted
Contributor II

Re: show or hide column by selection

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

Highlighted
New Contributor III

Re: show or hide column by selection

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

Highlighted
Contributor

Re: show or hide column by selection

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

Highlighted
Not applicable

Re: show or hide column by selection

Really simple, thank you. Nice example too.

Highlighted
Valued Contributor

Re: show or hide column by selection

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