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

How to make columns in a table appear/disappear based on selection?

Hey all,

I have a table in Qlikview with several expressions in it. I want to make them appear when they are selected.

Under the presentation tab of my table properties I select the conditional option. If I write here: ListboxName= 'Columname'

then the column will appear on selection and disappear otherwise. The problem I have is when selecting multiple values this doesn't work anymore.

I think I should work with an if statement and maybe the getSelectedfields function but I have no idea how to do this.

Is there anyone who can help me with this?

Thanks in Advance,

Jens

13 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

K

You are correct

I had "assumed" that ListBoxName is a field name. Looking at it now, it seems that was wrong.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Jens

I think you need to post your QVW file (or at a sample of it). Then we can be sure to help you without misunderstanding each other.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

In attachment a sample of my qvw file. Hopefully this makes things more clear.

jonathandienst
Partner - Champion III
Partner - Champion III

Jens

Got it working on the Actual table. I only did four fields (Actual, Actual % cont to Growth, Actual % of Total, Actual vs. PY (abs)) , I leave the rest for you.

Needed some special handling for Actual, as it is also contained in the other Measure values.


=If(Len(GetFieldSelections(Measure))>0, Wildmatch(GetFieldSelections(Measure, ',', 20), 'Actual', 'Actual,*', '*,Actual', '*,Actual,*')>0, 0)
=If(Len(GetFieldSelections(Measure))>0, Wildmatch(GetFieldSelections(Measure, ',', 20), '*Actual % of Total*')>0, 0)


Also needed to detect when no measure selected to suppress the display of all expressions.

=If(Len(GetFieldSelections(Measure))>0, ..., 0)

If you want to display all expressions if no selection, change the last 0 to -1....

=If(Len(GetFieldSelections(Measure))>0, ..., -1)

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein