Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Hide/Show on columns in QlikView 10

HI,

I am trying to make a straight table that allows columns to be conditionaly shown based on selections from a list box. The list box contains facts like Net Sales $, Net Sales Units, GM$, etc. I have no problem getting it to work if I just want the table to show one fact at a time. In the conditional show I can just put x.Fact='Net Sales $' on the Net Sales $ expression and it works fine. However, my problem is I want the user to be able to select multiple facts and have them appear in the table. I want them to be able to choose as many or as little as they want to see. I feel like this should be easy if the condition just checks to make sure the fact is selected and then allows for any other selections to be added on as well. I am new to QlikView so maybe this is alot harder than I think it should be. Is there any way to make this happen?

Thanks,

Austin

1 Solution

Accepted Solutions
Not applicable
Author

Thank you for the quick response. I just figured out another work around just minutes ago. By putting this...SubStringCount(GetFieldSelections(x.Fact, ',' ,Count(Distinct x.Fact)), 'Net Sales $') ..... into the conditional field of Net Sales $ it worked. I then just changed the name for each column and so far so good.

View solution in original post

7 Replies
pover
Luminary Alumni
Luminary Alumni

Austin,

x.Fact will return a value only when one unique value is selected. You are going to want to return a list of values to do a mulitple hide/show, so try the following:

1. Create a variable in QlikView that is the following:

=chr(39) & getfieldselections ( x.Fact, chr(39) & ',' & chr(39) ) & chr(39)

Note: the chr(39) are so the list contains single quotes since the values are strings

2. In the conditional field for Net Sales $ put the following:

=match('Net Sales $',$(vVariable))

This isn't tested so there are probably some details to work out, but that should give you what you are looking for.

Regards.

Not applicable
Author

Thank you for the quick response. I just figured out another work around just minutes ago. By putting this...SubStringCount(GetFieldSelections(x.Fact, ',' ,Count(Distinct x.Fact)), 'Net Sales $') ..... into the conditional field of Net Sales $ it worked. I then just changed the name for each column and so far so good.

pover
Luminary Alumni
Luminary Alumni

Yeah, looks good.

pgdavis2
Partner - Creator
Partner - Creator

Very helpful - thanks!!

mellerbeck
Creator II
Creator II

Hey Austin, would you mind posting an example QVW of what you worked out for the Conditional Hide/Show column!

Thanks!

Not applicable
Author

Even though this is a very old post, I wanted to mention, I was having the same issue, found your post, tried your solution and bingo, my issue for the last 3 days is gone, thanks to you.

Hugo

Not applicable
Author

Hi Austin

I have a same query i want to hide a column based another column values i.e two values one is INDIA and another one is US,

If these two values filtered then second column has to be present other wise it is in hidden mode

please suggest this